MySQL Forums
Forum List  »  MyISAM

Re: myisamchk sorting records descending
Posted by: Ulf Wendel
Date: May 18, 2005 02:19AM

James Day wrote:
> Might: ALTER TABLE ... ORDER BY column DESC. Don't
> know if DESC is supported.

As Ingo said: there's no need to support it from a performance standpoint, although MySQL does support the sort order option.

http://dev.mysql.com/doc/mysql/en/create-index.html

MySQL is clever enough to traverse B-tree indexes in any order, no matter how they are sorted. MySQL can traverse ascending indexes in descending order and descending indexes in ascending order. MySQL does not have the most fancy optimizer on the market, but it has some clever details, check the manual.

http://dev.mysql.com/doc/mysql/en/order-by-optimization.html

By the way, the same applies for recent versions of MaxDB.

Ulf

Options: ReplyQuote


Subject
Views
Written By
Posted
6879
April 12, 2005 01:19AM
3211
April 26, 2005 12:50AM
Re: myisamchk sorting records descending
4370
May 18, 2005 02:19AM
2905
April 28, 2005 08:21AM


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.