skyline — 2011-07-21T16:29:04-04:00 — #1
I'm experiencing high server load due to mysql.
I have lots of these queries:
SELECT * FROM tablea WHERE field1='XXX' AND field2='YYY' ORDER by timeset DESC LIMIT 1;
I'm retrieving around another 5 fields as a result.
Should i create a multi column index on tablea setting all 3 fields?
r937 — 2011-07-21T18:15:01-04:00 — #2
how can that be???
you're already retrieving all possible columns via your use of the dreaded, evil "select star"
skyline — 2011-07-21T18:34:47-04:00 — #3
Quiet right! So i need to list all the fields after the select. When you say it depends....?
r937 — 2011-07-21T18:44:38-04:00 — #4
quiet riot!!! one of da best metal bands evar!!
yup, it depends on which queries you want to run