HI

I have a query like this 

select * from table where (
( field1 = 'VALUE1' and field2 like 'VALUE2%' ) 
OR 
( field3 = 'VALUE1' and field2 like 'VALUE2%' ) 
)

I have created two composite indexes - one on field1 + field2 and one
on field3 + field2. Explain on the SQL indicates that the indexes are
possibly used. The query takes an age to run and looking at my log
indicates a full table scan.

I have also tried indexing just field1 and field3 separately but this
doesn't help. I have run an analyze.

Chris

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

Reply via email to