Index only sometimes used

2002-03-20 Thread Steve Gardner
Hi All Could someone explain to me why an index in a select I am doing is only sometimes used. The select I do is a complex one with multiple tables, and when it uses the index it takes 1.5 seconds, but when it dosnt it takes 1 min and 25-50 seconds. I have simplified it down and founed the

Fw: Index only sometimes used

2002-03-20 Thread Steve Gardner
Hi Again Thanks for all the responces Check the manual section on the query optimiser,.I seem to remember that if MySQL has to check more that some percentage of a table (30% ?) the optimiser guesses it can search the entire table just as quickly. Someone please correct my if I'm wrong.