MySQL indexes - what are the best practises?
- by Haroldo
I've been using indexes on my mysql databases for a while now but never properly learnt about them. Generally I put an index on any fields that i will be searching or selecting using a WHERE clause but sometimes it doesn't seem so black and white.
What are the best practises for mysql indexes?
example situations/dilemas:
If a table has six columns and all of
them are searchable, should i index
all of them or none of them?
.
What are the negetive performance
impacts of indexing?
.
If i have a VARCHAR 2500 column which
is searchable from parts of my site,
should i index it?