MySQL indexes - what are the best practises?
Posted
by Haroldo
on Stack Overflow
See other posts from Stack Overflow
or by Haroldo
Published on 2010-06-15T21:39:07Z
Indexed on
2010/06/15
21:42 UTC
Read the original article
Hit count: 188
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?
© Stack Overflow or respective owner