MySQL Forums
Forum List  »  Optimizer & Parser

Re: Not using index optimal
Posted by: Jørgen Løland
Date: May 15, 2011 01:57PM

Hi Per,

You are right to be suspicions about this. Unfortunately, the EXPLAIN output is wrong for this query. MySQL does as you want it to, i.e., it reads 100 rows, returns them and nothing more.

"Using where" means that MySQL matches the content in the index with the conditions you provided. Take a look here for more info:

But why do you have a table with 25000 rows in which all rows have the same values for column a and b? And if that's strictly necessary: why do you have "a=... AND b=..." in the query when you know that all rows will match this condition?

Hope this helps,
Jørgen Løland
Software Engineer, MySQL, Oracle

Options: ReplyQuote

Written By
May 14, 2011 01:02PM
May 14, 2011 01:33PM
Re: Not using index optimal
May 15, 2011 01:57PM
May 16, 2011 03:23AM
May 16, 2011 06:41AM
May 15, 2011 11:25PM
May 16, 2011 03:18AM

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.