Home > database > Mysql... Count (1) a fifty million - table data, need 50 s, how to solve?
Mysql... Count (1) a fifty million - table data, need 50 s, how to solve?
Time:09-16
Select count (1) the from sc_crm_ci_public_custinfo;
CodePudding user response:
You can refer to my blog: https://blog.csdn.net/yenange/article/details/78973546
CodePudding user response:
50 million records, without any conditions, a statement of how you optimize, the Count function will not be too fast, because all the data need to be read from disk, loop computations 50 million times, bottlenecks in the disk, CPU, memory, in solid state disk would be much better,