Select count (url) from the test group by type. Time: 6.04;
Total 50 million,
The url as the primary key
Url, type two fields have index
How to put the performance improvement within 3 s!!!!!!!!!!
CodePudding user response:
Table structure and implementation plans and grouped by type summary results posted aCodePudding user response:
Collect the histogram try of this table,CodePudding user response:
Add url type joint index, similar to table, so that will be a lot fasterCodePudding user response:
Respectively is to use count (1) and count (url) query, time is long count (url)
Joint index effect is not obvious
CodePudding user response:
Count (1) 6 sThe count (url) 13 s
CodePudding user response: