生产中的数据库提取性能评估
我正在编写一个程序,将表 A 中的数据提取到 txt 文件。开发数据库中的表有 100 多行数据。但在生产数据库中拥有数百万行数据。 如果该过程适用于生产数据库,我将如何估计所需的性能时间? 我需要输入与生产一样多的数据吗?
I am writing a procedure to extract data from a table A to txt file. The table in development db is having 100+ thousands rows of data. But in production db is having millions rows of data.
How am I going to estimated the performance time required if the procedure apply to production db?
Am I need to pump in data as many as production?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
另一个问题是硬件。几乎可以肯定生产比开发更好。
如果您有权访问生产环境,则可以使用相同的过程从表的副本(假设有 100 万行)中提取数据,之后您可以假设提取时间是成比例的。
如果计算中没有其他变量,您可以使用磁盘速度或 CPU 速度在 dev 和 prod 之间制定比例(取决于进程的类型:更多计算或更多 I/O。)
Another problem is the hardware. Almost sure the production is better than dev.
If you have access to production you can use the same procedure to extract from a copy of the table (with let's say 1 milion rows) and after that you can suppose the time for extraction is proportional.
If there is no other variable in the ecuation, you can make a proportion between dev and prod using disks speed or cpu speed (depends of what is the type of your process: more computing or more I/O.)
您必须对生产进行测试运行。
这不仅仅是硬件或否。或记录。您必须考虑生产系统的负载。
因此,仅根据硬件容量或数量来预测任何事情都是不安全的。的记录。
即使在非高峰时段,生产数据库也可能支持报告生成和 ETL 系统。
You have to a test run on the production.
It's not just the hardware or the no. or records. You have to consider the load on the production system.
So it's not safe to predict anything just based on the hardware capacity or the no. of records.
Even in the off-peak hours, production database may be supporting report generations and ETL systems.