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
2128
September 23, 2013 12:21PM
1171
September 23, 2013 01:43PM
1182
September 23, 2013 03:38PM
1277
September 24, 2013 09:52AM
Re: Very slow query
1146
September 28, 2013 03:26PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.