MySQL Forums
Forum List  »  Performance

Re: Creating Sort Index Slow
Posted by: Rick James
Date: March 19, 2014 04:56PM

> state SENDING DATA become super slow.

That "state" is essentially useless information. It is saying that the query is hard to optimize and is taking a long time.

Leading wildcards (%) are essentially unoptimizable. This index _might_ help:
INDEX(type, wos_date, refno)

EXPLAIN SELECT ...;
would provide more info for us to help you with.

Do you really need "*"? Or do you need only a few of the fields? Specifying only the needed fields _may_ speed it up. With "SELECT *", it will collect all the columns (and you have a lot!) into a temp table. This temp table will be big and either in memory or on disk. In either case it will be slow because of the bulkiness.

Again, the subquery trick I mentioned will _probably_ help in this query.

Options: ReplyQuote


Subject
Views
Written By
Posted
41688
March 14, 2014 09:59PM
15871
March 17, 2014 11:59AM
10847
March 17, 2014 08:20PM
8190
March 17, 2014 08:46PM
6794
March 17, 2014 10:31PM
5387
March 18, 2014 01:13AM
Re: Creating Sort Index Slow
5101
March 19, 2014 04:56PM
4791
March 19, 2014 05:04PM
4086
March 19, 2014 10:06PM
7218
March 19, 2014 11:23PM


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.