简体   繁体   English

不相关的SQL表的大小是否会影响彼此的性能

[英]Does size of unrelated SQL tables affect each others performance

I have an api written in php, that generally selects from / inserts to 5 MySQL tables of size 10K rows. 我有一个用php编写的api,它通常从/插入5个大小为10K行的MySQL表中。

Each api request is logged into separate table of size 10M rows (growing by 100K rows per day). 每个api请求都记录到大小为10M行的单独表中(每天增加10万行)。

The api only inserts into the big table. api仅插入大表中。 This table is used for statistics / error reporting and is never selected from or joined to another table in any api request. 该表用于统计/错误报告,在任何api请求中都不会从另一个表中选择或加入该表。

Can size of the big table at some point slow down unrelated operations in those other tables? 大表的大小是否可以减慢其他表中不相关的操作?

If you have table A and table B, which are completely unrelated, then A's size will not affect the speed of selections from B or insertions to B. However, in your case they are not completely unrelated if the big table can be found in the same database running on the same computer as the others, so, if you issue many commands related to the big table, then due to the concurrency, commands regarding other tables might become slower. 如果您具有完全不相关的表A和表B,则A的大小不会影响从B进行选择或插入到B的速度。但是,如果您可以在表中找到大表,则它们并不完全无关。同一数据库与其他计算机在同一计算机上运行,​​因此,如果您发出许多与大表相关的命令,则由于并发性,与其他表有关的命令可能会变慢。 If this problem will occur at all, then it will be a slow process, you will observe it way before it becomes severe. 如果完全会出现此问题,那么这将是一个缓慢的过程,您将在严重之前先观察一下它。 As a result, I believe you should not worry about this now, but keep in mind the options you need to consider if the problem materializes. 因此,我相信您现在不必担心这一点,但是请记住,如果问题出现,则需要考虑的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM