On Fri, Oct 17, 2008 at 10:31 AM, Ian Christian <[EMAIL PROTECTED]> wrote:

> 2008/10/17 Rob Wultsch <[EMAIL PROTECTED]>:
>
> > *How long does the second query actually take to run compared to first?
>
> Actually, really quickly - so quickly that I also suspected that a
> full table scan was not taking place.   I'd like to understand how the
> output of EXPLAIN can differ from the actual strategy used, why is
> there this difference (if indeed, there is)?   This question is now
> redundant, as we're approaching the problem from a different angle,
> but this will bug me if I don't get to understand it :)
>
> Thanks!
>


flush status;
//run your query
show status like 'Handl%';

That will tell you how much work it actually did to grab the info. Remember
that EXPLAIN only shows estimates of the amount of work required to perform
a query.

My guess is that the limit confuses the optimizer and it shows a worst case
scenario (full table scan) for the query. Note that the explain is still
saying that it will us an index.

-- 
Rob Wultsch

Reply via email to