MySQL Forums
Forum List  »  InnoDB

Re: InnoDb Select Performance
Posted by: Rick James
Date: December 31, 2014 11:41AM

> order by idreg desc , idano desc
> Index ( idano desc , idreg desc )

Notice the order. That's like having a list of people sorted by first name, but wanting the first two alphabetically by last name.
Try the EXPLAIN with the ORDER BY in the opposite order.
Change the order of the INDEX, or add another index (no need to make both UNIQUE).

INDEX(Will) would be useful.

Please provide
SHOW CREATE TABLE

Indexes can be powerful! But they are also limited.

Options: ReplyQuote


Subject
Views
Written By
Posted
1905
December 30, 2014 01:36PM
Re: InnoDb Select Performance
1009
December 31, 2014 11:41AM
1219
January 02, 2015 10:26AM


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.