>>>>> "Bob" == Bob Kline <bkline@stripped> writes:
Bob> On Mon, 20 Sep 1999, Partha Dutta wrote:
>> Primary key information for the table. Database_ID is int(11), and Account
>> is a varchar(12)
Bob> Well, clearly key_len [given by EXPLAIN SELECT as 4] doesn't mean what I
Bob> would have guessed it meant. The manual simply says "The key_len column
Bob> indicates the length of the key that MySQL decided to use." I'm going
Bob> to step back and let somewone from TcX explain what's going on.
Hi!
The 4 means that MySQL uses 4 bytes of the key (= the size of the
integer part) of the key to find the rows that matches
database_id = 0
In the query:
select * from b2cmr1 where database_id = 0 order by database_id, account;
MySQL should notice that we are using the 'Database_id' key to range
the find the matching rows and it should automaticly delete the ORDER
BY part.
The only way to find out what's going on is to compile MySQL with
--with-debug and generate a trace file when running this query.
Partha; Can you try to do a trace file and mail me everything between
the entry:
>mysql_select
and
>filesort
(+ the next 100 lines after filesort)
Regards,
Monty