PDA

View Full Version : When do you INDEX fields?


Pykex
05-09-2009, 10:13 PM
Should I index a column of mine if it's frequently used in WHERE statements?
Should I index a column of mine if it's frequently used in ORDER BY statements?
Should I index a column of mine if it's frequently used in GROUP BY statements?

bdl
05-10-2009, 04:31 AM
MySQL Manual : Optimization (http://dev.mysql.com/doc/refman/5.1/en/optimization.html) : Optimizing SELECT and other statements (http://dev.mysql.com/doc/refman/5.1/en/query-speed.html)

Pykex
05-10-2009, 04:54 AM
Can you just give the answer and not a link please?