MySQL Forums
Forum List  »  Optimizer & Parser

Re: Why does this query take 2 minutes?
Posted by: KimSeong Loh
Date: February 02, 2005 07:36PM

MySQL optimiser choosed to use the index 'hid' to find for rows having value 'petit'.

For each row having the value of 'petit', mysql reads the whole data row and check for the rest of the condition.

If you want to speed up this query, try to create a composite index (hid,hcreationtimestamp,hresultid)
Then MySQL will be able to count from the index without reading the data rows.

Options: ReplyQuote

Written By
February 02, 2005 10:39AM
Re: Why does this query take 2 minutes?
February 02, 2005 07:36PM
February 03, 2005 07:21AM
February 03, 2005 08:34PM
February 03, 2005 08:43PM

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.