Keep It Simple, Stupid | |
PerlMonks |
Re: OT: Indexes in MySQLby monarch (Priest) |
on Jan 20, 2009 at 21:19 UTC ( [id://737679]=note: print w/replies, xml ) | Need Help?? |
Please see the MySQL document page on multiple column indexes.
Essentially performance for the single combined index vs two separate indices (not sure why they are referred to as indexes) is the same when you query using the first key or both keys. The combined index is only effective if you don't plan on attempting to query using only the second key. Order of keys is important in a combined index.
In Section
Seekers of Perl Wisdom
|
|