[thelist] tuning MySQL

Mattias Thorslund mattias at thorslund.us
Wed Nov 29 15:09:43 CST 2006

Edwin Martin wrote:
> 1) Add one or two indexes (on tbl_one.id and optionally tbl_two.id).

+1 on indexes, they often have dramatic effect on slow queries. Do an
"explain" of your query and send us what you get. The output will give
some clues about the best indexes to try.

EXPLAIN (your select query)

> 2) If you do a lot of updates in a row, you can "wrap" them in a single
> update, speeding up the database a lot.

+1 An obvious one.


More information about the thelist mailing list