MySQL Forums
Forum List  »  Performance

Re: Explain plan question
Posted by: Harrison Fisk
Date: March 22, 2005 12:25PM

Hi,

With the first row of the first EXPLAIN, notice that the 'type' is index. That means that MySQL is doing a full index scan where by it has to read every single entry in the index. It can occur when you normally do a full-table scan, but there is a covering index, so it instead reads the entire index without using the normal index properties.

The reason it doesn't show up in possible_keys is because it isn't actually possible to use it for reducing the rows being returned (which is what a normal index lookup does). However it still decides to use it for a full index scan, so it is still picked. You will always see this behavior with a 'type' of index.

Harrison Fisk, Trainer and Consultant
MySQL AB, www.mysql.com

Options: ReplyQuote


Subject
Views
Written By
Posted
2948
March 17, 2005 11:10AM
Re: Explain plan question
1774
March 22, 2005 12:25PM


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.