How to profile a mysql db?
I'm an mssql veteran who's received a job that involves tuning a mysql db. with mssql it was simply a matter of firing up the db开发者_如何学JAVA profiler and then crunching up the data it collects. I can't seem to find anything similar for mysql.
thanks in advance
You can enable the PROFILER in the mysql query tool and profile individual statements. Also see Using the New MySQL Query Profiler or How to profile a query in MySQL.
You can also use EXPLAIN to get the query optimization plan, but it only works for SELECT queries.
精彩评论