View Single Post
Old 01-11-2012, 10:42 PM   PM User | #8
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,245
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Quote:
Originally Posted by helenp View Post
I read that mysql will only use one index per table,...
Not true. *PER* join, probably true. Maybe even per condition in the WHERE clause. But if you have multiple WHERE conditions, it can take advantage of multiple indexes. (It may not choose to. But that's a different thing. If a single index reduces the number of candidate records down to just a few, it's faster to then scan the records then invoke another index.)
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote