MySQL Forums
Forum List  »  Performance

Re: Why is ORDER BY ASC is slow but ORDER DESC is fast ? and how can i fix it ?
Posted by: Rick James
Date: October 03, 2015 08:01PM

Interesting.

Please provide

SHOW CREATE TABLE

EXPLAIN SELECT (with ASC and with DESC)

And run this for each direction:
FLUSH STATUS;
SELECT ...
SHOW SESSION STATUS LIKE 'Handler%';

It would probably help to have the composite index:
INDEX(enabled, category)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Why is ORDER BY ASC is slow but ORDER DESC is fast ? and how can i fix it ?
1315
October 03, 2015 08:01PM


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.