Re: Why does this query take 2 minutes?
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.
Subject
Views
Written By
Posted
4020
February 02, 2005 10:39AM
Re: Why does this query take 2 minutes?
2597
February 02, 2005 07:36PM
2334
February 03, 2005 07:21AM
2404
February 03, 2005 08:34PM
2513
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.