Re: Is this GROUP BY query using an index?
It is using the index, in fact it reads the index without reading the table data rows. This is shown by the type=index.
No key is selected because, it does not use the index to choose any rows, it read the whole index (whoel table), every single entry in the index.
If you try to remove the index, and do an EXPLAIN, you are likely to see a Using filesort in the extra column, this is required for sorting the rows to do the GROUP BY.
Subject
Views
Written By
Posted
1878
September 23, 2005 12:55PM
1258
September 23, 2005 04:33PM
Re: Is this GROUP BY query using an index?
1312
September 28, 2005 11:46PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.