Antivirus
11-21-2006, 04:48 PM
some of my queries on custom tables tabe a while to load, I know I could definitely create some additional indexes (other than just the primary id) on them to increase performance, but am not really sure which ones. Generally speaking, is it whichever columns are being used in LEFT JOINs or is there something more to it. I was looking for some documentation on mysql.com or here about when it's recommended to create additional indexes but can't seem to find any.
Perfect example, in this thread (https://vborg.vbsupport.ru/showthread.php?t=127330) I had a table which had more than 60,000 records, each having one of 100 different entries. Until Sir Adrian and PaulM brought it to my attention, i had no idea that the zipcode column needed to be indexed as well.
So basically my question (to get to the point) is "when should I know that another column on my table needs to be indexed, and how do I know which one(s)?".
Perfect example, in this thread (https://vborg.vbsupport.ru/showthread.php?t=127330) I had a table which had more than 60,000 records, each having one of 100 different entries. Until Sir Adrian and PaulM brought it to my attention, i had no idea that the zipcode column needed to be indexed as well.
So basically my question (to get to the point) is "when should I know that another column on my table needs to be indexed, and how do I know which one(s)?".