3

I want to track how much time needed for my queries to be executed I referred to this post but I get only the queries without the time. It is possible that after using my web application for a wile,using select, update , insert queries (not from console but real web-application execution) I can get a summary like this output generated by SHOW PROFILES; command. I am working with wamp mysql V5.5.24 Many thanks

Edit: I used triggers to track the update and insert statement following this method I still have the problem how to track the select query. any idea please?

Community
  • 1
  • 1
Ben
  • 329
  • 1
  • 3
  • 17

3 Answers3

6

This no longer works.

As of July 2013, you need:

general-log=1
general-log-file = "C:\wamp\logs\mysql_general.log"
Jonathan
  • 6,741
  • 7
  • 52
  • 69
1

Are you sure you are not getting execution times in your slow query log?

If you are just looking to optimize your queries (rather than checking the execution time of every single one), you can look at the mysql server status in phpmyadmin (assuming you kept it in your wamp server) as covered here. The full tutorial is paid, but the preview will get you into the server status page where phpmyadmin will point out problem areas for you.

Sarah Kemp
  • 2,670
  • 3
  • 21
  • 29
  • thanks Sara, my application is simple I want just to track one table where the data is inserted continuously and after that selected (also continuously by ajax call).I want to measure the difference between the insert time and the select time. – Ben Feb 14 '13 at 02:04
1

Finaly I used the general log by setup WAMP server like this

[mysqld]
 port=3306
 long_query_time = 1
 slow_query_log = 1
 slow_query_log_file = "E:/wamp/logs/slowquery.log"
 log = "E:/wamp/logs/genquery.log"

after that I used this tool (trial version) dbForge Studio where I can use a query profiler and I get the complete execution time.

Ben
  • 329
  • 1
  • 3
  • 17