MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:C.R.Vegelin Date:December 19 2005 12:47pm
Subject:Re: How to avoid sorting sorted tables ?
View as plain text  
Thanks James,

I looked at
for the table properties in the Information_Schema.Tables. I tried:
SELECT table_name, update_time FROM Information_Schema.Tables
WHERE table_name LIKE 'section05';
| table_name | update_time         |
| section05  | 2005-12-19 12:13:42 |
However, Update_Time applies also to changes without affecting the physical 
table order.
All the other ..._Time table properties don't specify the last sort_time.
I am afraid I have to simulate an IsSorted property myself.

Regards, Cor Vegelin

----- Original Message ----- 
From: "James Harvard" <>
To: "C.R.Vegelin" <cr.vegelin@stripped>
Cc: <mysql@stripped>
Sent: Monday, December 19, 2005 10:48 AM
Subject: Re: How to avoid sorting sorted tables ?

>I suppose you could parse out and compare the update_time value from SHOW 
> (or maybe 
> there's a simpler way with MySQL 5's new schema database 
> ) and 
> compare it with the last time the table was ordered.
> HTH,
> James Harvard
> At 9:29 am +0000 19/12/05, C.R.Vegelin wrote:
>>Now I use: ALTER TABLE t ORDER BY a, b, c, d, e, f;
>>This works fine, but takes about 13 minutes for 6 million rows.
>>Without inserts, deletes or other sorts, this PK order remains intact.
>>Suppose a table is sorted on PK and I give the above ORDER BY,
>>I would like to have something like "Table is already sorted".
>>Does anyone know how to simulate this ?

How to avoid sorting sorted tables ?C.R.Vegelin19 Dec
  • Re: How to avoid sorting sorted tables ?James Harvard19 Dec
  • Re: How to avoid sorting sorted tables ?C.R.Vegelin19 Dec