in reply to Autogenerate SQL Indexes?
The principle is simple. The practice is harder. The principle is that you want to turn on profiling to be able to identify your top performance hogs. One by one try to optimize them. After a few hotspots are improved, your database should be happier. Repeat every time your load is becoming a problem again.
I don't know too much about what profiling tools exist for postgres and mysql, however in a quick google I turned up this article that describes one which may do the trick. You probably want to look for more on this. (In particular I know that Oracle has a ton of tools for monitoring different kinds of stresses that queries put on the database. For instance you can identify what queries take the most disk accesses, internal locking, CPU time, etc...)
|
|---|