Markus Fischer wrote:
Basically, this means if I've a table like this
id1
id2
id3
id4
id5
and I've two different select statements:
select * from ... where id1 = .. and id2 = ..
and the other being
select * from ... where id3 = .. and id4 = ..
I would create two indexes, one for id1/id2 and the other for id3/id4 ,
right?
yep. remember that mysql can only use one index per table, and that
column order is significant in a multi column index.
so if your index was (id1, id2) then a query with "where id1 = x and id2
= y" would use the index, as would "id1 = x". but plain old "where id2
= x" would not.
-jsd-
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]