Thread: MySQL Indexes
m0nkeymafia

Just a quick one, cos its easy but may help some of the newer guys
When you add indexes to a table in mysql make sure you do it in the order that you use the data
i.e. if you do

WHERE field_a = '1' AND field_b = '4'

Make sure you index on field_a,field_b
if you do it the other way around then mysql wont use the index, so you gotta make sure when you write your queries to remember how you created the indexes

Simple but often overlooked

P.s. hot chocolate rocks for hangovers!! Applause

nutballs

really? that is GAY

good to know, since I am delving into the

net

 herworld of

PHP

 /mysql.


Perkiset's Place Home   Politics @ Perkiset's