Home > database >  Oracle_count group by optimization
Oracle_count group by optimization

Time:09-19

Select count (1) from the test group by type. Time: 6.02 s
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 a

CodePudding 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 faster

CodePudding 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 s
The count (url) 13 s


CodePudding user response:




  • Related