From: Dan Nelson Date: December 13 2006 10:50pm Subject: Re: How to determine MyISAM sort order? List-Archive: http://lists.mysql.com/mysql/203912 Message-Id: <20061213225023.GE79418@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Dec 13), Jacek Becla said: > Is there a way to find which index was used to sort > MyISAM table (suppose someone run > "myisamchk --sort-index --sort-records=2" in the past, > how to find that sorting was done based on index #2?) You can run a "select * from mytable" and see whether any columns are in order; that's about it. Note that if records were inserted/deleted since the sort, no column may be completely in order. > And a related question: how to determine which is > the index "#2"? I guess if I look at the order of indexes > in the 'SHOW CREATE TABLE ' report that will do it. > Is that the right way? Is there more official way? You can also use SHOW FIELDS from , or select column_name from information_schema.columns where table_name="" and table_schema="" and ordinal_position=2; -- Dan Nelson dnelson@stripped