Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In Microsoft SQL Server you can see Execution Plans for queries to see how a query is executed, what joins take the most time and see any missing indexs

now i want to do the same for MySQL scripts that run on a MySQL Server, i am wondering what programs or tools i can uses for this

i am aware of EXPLAIN however from my reading it only handles SELECT which is ok for SELECT and INSERT INTO ... SELECT queries but i also want to check out UPDATE and DELETE queries

EDIT: we are running MySQL 5.5

share|improve this question
    
As of version 5.6.3, EXPLAIN works with Insert/Update/Delete, too. –  ypercube Sep 12 '13 at 23:08
    
@ypercube would explain why i kept reading how it only did SELECT, however i have check the version we're using and it's 5.5, i'll update my question to explain this as i had no idea it changed between versions –  Memor-X Sep 12 '13 at 23:14
1  
You can rewrite your DELETE and UPDATE statements into SELECTs. There are some tools that will do that for you (the percona tools for example). You can also check out SHOW PROFILE: dev.mysql.com/doc/refman/5.5/en/show-profile.html –  TheVedge Sep 13 '13 at 0:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.