Thanks James,
I looked at http://dev.mysql.com/doc/refman/5.0/en/tables-table.html
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" <[EMAIL PROTECTED]>
To: "C.R.Vegelin" <[EMAIL PROTECTED]>
Cc: <mysql@lists.mysql.com>
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
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]