jeremiahs
jeremiahs

Reputation: 4145

MySQL Query and PHP Script Tuning: How can I find the problems?

I have inherited a site running several different software packages worked on by several different people over several years, with lots of modifications and addons throughout.

How can I systematically, pervasively, and I hope automatically log/monitor/find scripts that use slow queries, persistent connections, unindexed joins, etc.?

Upvotes: 4

Views: 1363

Answers (2)

Petah
Petah

Reputation: 46040

There is a variety of tools to service these needs:

Also on a site note, another awesome tool is Toad for MySQL (free) which provides full database management (including tables, views, triggers, functions, procedures, etc), diagramming, and schema/data comparison functions.

I personally recommend, in order:

  • New Relic (free, or paid plan if its within budget)
  • mysqltuner (only needs to be used once or twice)
  • MySQL Enterprise Monitor (too expensive for most cases, but very good)

Upvotes: 2

Fabian Barney
Fabian Barney

Reputation: 14549

You can enable slow query log. mysqltuner is also good as a starting point to tune most important params.

Upvotes: -1

Related Questions