MySQL Forums
Forum List  »  Stored Procedures

Re: Very slow query
Posted by: Rick James
Date: September 28, 2013 03:26PM

I agree with
index(collectionsearchterm,dateutc)

However, since you are in a Stored Procedure, I worry that the optimizer may not 'do the right thing'. Please run the EXPLAIN from within the SP.

Also, to verify what it is doing, collect
SHOW STATUS LIKE 'Handler%';
before and after the SELECT. Then diff the values. That will tell us whether it is really using the second part of the INDEX.

Options: ReplyQuote


Subject
Views
Written By
Posted
1789
September 23, 2013 12:21PM
962
September 23, 2013 01:43PM
957
September 23, 2013 03:38PM
1125
September 24, 2013 09:52AM
Re: Very slow query
959
September 28, 2013 03:26PM


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.