Re: myisamchk sorting records descending
Posted by:
James Day
Date: April 27, 2005 01:12AM
Two ways to do this, one which might work, one which will.
Might: ALTER TABLE ... ORDER BY column DESC. Don't know if DESC is supported.
Will work: create a copy of the table and use INSERT ... SELECT FROM first table ORDER BY column. Then rename original table to a new name and the copy to the original name. When you're sure that all is OK, delete the original table.
You can probably speed up the second form by using ALTER TABLE ... DISABLE KEYS on the empty table before copying the data. Then copy and enable the keys. Or you could create the table withotu the keys and add them after copying the data.
Subject
Views
Written By
Posted
7031
April 12, 2005 01:19AM
3252
April 25, 2005 02:44AM
3286
April 26, 2005 12:50AM
Re: myisamchk sorting records descending
3076
April 27, 2005 01:12AM
4514
May 18, 2005 02:19AM
4409
May 19, 2005 01:03AM
2969
May 19, 2005 02:22AM
2997
April 28, 2005 08:21AM
2887
May 04, 2005 05:24PM
3556
May 09, 2005 10:25AM
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.