Hi,
how big is the result set in your 2 queries (compared to the number of
rows in the table)?
Seems that in the 2nd case the query was much more selective than in the
first case. Therefore using an index in the first query might have been
considered not advantageous.
But try this also with 'sel
Hi,
This happens on MySQL 3.23.44
CREATE TABLE ttble (
`k1` varchar(100) NOT NULL default '',
...
`k2` varchar(65) NOT NULL default '',
...
PRIMARY KEY (`k1`, `k2`)
...
) TYPE=InnoDB
When k1 is compared to a string with only one known letter...
EXPLAIN SELECT * FROM ttb