MySQL Forums
Forum List  »  Optimizer & Parser

Re: Not using index optimal
Posted by: Per Steffensen
Date: May 16, 2011 03:23AM

Jorgen Loland Wrote:
> 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.

Hmmm, ok. Any plans about making the EXPLAIN output better in this area? :-)

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

One thing is that is on says "Using where" (it should maybe also say "Using order by" and "Limiting row access by using limit"), but it is really confusing that is doesnt say "100" in "rows" - that is the most confusing part seen from my side.

> 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?

Ahhh, it is just in a test I have that. In real production of the table I have hundreds of thousands of rows in this table, with lots of different values for a and b. Sorry I didnt explain that.

Options: ReplyQuote

Written By
May 14, 2011 01:02PM
May 14, 2011 01:33PM
May 15, 2011 01:57PM
Re: Not using index optimal
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.