List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:August 19 2003 8:26pm
Subject:Re: "hard" sort table order
View as plain text  
In the last episode (Aug 19), anders thoresson said:
> Is it possible to resort the rows in a table like in a query where using 
> ORDER BY, but have to new sort order stored in the table structure?

CREATE TABLE newtable AS SELECT * FROM oldtable ORDER BY myfield

newtable will have its records physically sorted.

You can also use myisamchk -R on a table to force the records to be
physically sorted by a particular index.  This only works on MyISAM
tables.

-- 
	Dan Nelson
	dnelson@stripped
Thread
"hard" sort table orderanders thoresson19 Aug
  • Re: "hard" sort table orderYves Goergen19 Aug
  • Re: "hard" sort table orderDan Nelson19 Aug
  • Re: "hard" sort table orderRajesh Kumar19 Aug