Page 1 of 1

Profile times compared to realtime

Posted: Mon 17 Oct 2011 01:31
by rmontrose
I'm tracking down a problem with MySQL with a bunch of nested Views (terrible code) and trying to find which ones are talking the most time. I have a sample query that takes 28 to 40 seconds to run. In the dbForge Studio, running a profile of the query, it lists the total time as 0.000033

Connection string User Id=root;Host=localhost;Database=testdb;Connection Timeout=30;Character Set=utf8;
Duration of statement execution, sec. 0.000033
Server version 5.1.42

Why is the reported time just a fraction of the real-time value? Is there a way for me to find out which View is talking the most time?

Posted: Mon 17 Oct 2011 13:13
by Viktor
Unfortunately, we cannot reproduce this problem.
I'm tracking down a problem with MySQL with a bunch of nested Views (terrible code) and trying to find which ones are talking the most time. I have a sample query that takes 28 to 40 seconds to run. ...
Please let us know the product where you measured the sample query execution time?
What amount of records is returned when executing the sample query?

Execute the following queries and provide us the results:
SHOW VARIABLES LIKE 'profiling';
SHOW GLOBAL VARIABLES LIKE 'profiling';
Why is the reported time just a fraction of the real-time value? Is there a way for me to find out which View is talking the most time?
To identify the reasons of slow query execution it's necessary to analyze query execution plan.