I suppose you could parse out and compare the update_time value from SHOW TABLE 
STATUS
http://dev.mysql.com/doc/refman/4.1/en/show-table-status.html (or maybe there's 
a simpler way with MySQL 5's new schema database 
http://dev.mysql.com/doc/refman/5.0/en/information-schema.html ) 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".
>Similar to OPTIMIZE TABLE t and ANALYZE TABLE t.
>Does anyone know how to simulate this ?

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to