MySQL Forums
Forum List  »  Performance

Re: Please help with slow easy query
Posted by: Rick James
Date: April 27, 2009 09:47PM

This looks like a typo:
    -> AND cc.category_id = cc.category_id
so I don't trust the EXPLAIN

What is this supposed to be?
'rub.'currency,

And this?
 i.enabled & ( i.quantity >1 ) AS onstock

Probably not good to have ids be NULLable.

Please try this on each table:
  ANALYZE TABLE tbl;

Looking back at the message of 2009-04-24 07:18, it appears that it picked the 'wrong' table to start with. The ANALYZE may fix that.

How many rows in the result set? If it is more than about 40,000, the strange behaviour may be explainable -- that is, a table scan is probably better than jumping back and forth between the index and the data.

Options: ReplyQuote


Subject
Views
Written By
Posted
4990
April 21, 2009 11:58PM
2309
April 22, 2009 02:10AM
2303
April 22, 2009 09:37AM
2260
April 23, 2009 12:16AM
2157
April 23, 2009 02:20AM
2134
April 25, 2009 04:34PM
Re: Please help with slow easy query
2147
April 27, 2009 09:47PM
2171
April 29, 2009 09:44AM
2137
April 30, 2009 10:54PM


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.