MySQL Forums
Forum List  »  Optimizer & Parser

Re: Question on bad execution plan
Posted by: Rick James
Date: June 22, 2010 09:09AM

Eh? Each "row" in the EXPLAINs you have shown is either
type: ALL
key: NULL
meaning table scan, or
type: eq_ref (or other)
key: PRIMARY (or other)
except when you said FORCE INDEX(), which confused things. In that case, it needed to read ALL the rows, but told it to do things a slower way by using a particular index.

No, I don't know whether it is ignoring the FORCE and simply doing a table scan, or whether it is using the index. The only way I can see to figure out which it is actually doing is to have enough data so that you can see a difference in performance. And, I will state that using the index will be slower.

Options: ReplyQuote


Subject
Views
Written By
Posted
4439
June 16, 2010 07:36AM
1830
June 17, 2010 09:29AM
1562
June 21, 2010 09:24AM
1719
June 21, 2010 06:47PM
1777
June 22, 2010 07:33AM
Re: Question on bad execution plan
1803
June 22, 2010 09:09AM
1668
June 23, 2010 07:44AM
1777
June 24, 2010 12:17AM
1789
June 24, 2010 09:17PM
1636
June 28, 2010 02:39AM
1783
June 28, 2010 08:50PM


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.