Hello, MySQL gurus,
I have a non-unique key of 2 columns, the 1st is a varchar(15), 2nd is a int(10) unsigned. But when I 'explain' a query that uses this key, the key_len is only 15 with the key name shown up in the 'key' column of this table correctly though. According to the manual, that means how many columns of a key is accually used in the query. So the query is only using the 1st column of my key although it could not be efficient without using the 2nd column.
I am not sure if the key is only built on a single col ( I added the index as 'ALTER TABLE a ADD INDEX (f, s)') or it is the MySQL optimizer that decides it will only use the 1st column of the key. Is there any way to check and get it right?
Thank you all for help


--
ginger


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



Reply via email to