MySQL Forums
Forum List  »  Optimizer & Parser

Re: slow query sorting on group maximum
Posted by: Rick James
Date: November 19, 2010 07:20PM

There's more...
To avoid reaching into the data, and achieving "Using index", change
KEY `ix_data_expiry` (`expiry`),
to
INDEX(expiry, INTID)

Perhaps the real problem is trying to get 4 byte PRIMARY KEYs instead of the reasonably good 16 byte UNIQUE keys you have. Think seriously doing this switch in all three tables. Guess what, that gets rid of the table `identity` and eliminated my beautiful, but complex, subquery. That makes me sad. :(

Options: ReplyQuote


Subject
Views
Written By
Posted
1439
November 06, 2010 10:56AM
1445
November 07, 2010 01:05PM
1979
November 19, 2010 07:05PM
Re: slow query sorting on group maximum
1377
November 19, 2010 07:20PM
1382
November 19, 2010 07:14PM


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.