# Difference between query\_time and response\_time

**URL:** <https://forums.percona.com/t/difference-between-query-time-and-response-time/5019>\
**Category:** Other MySQL® Questions\
**Created:** [August 4, 2016, 12:03am UTC](https://forums.percona.com/t/difference-between-query-time-and-response-time/5019 "2016-08-04T00:03:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aserdp](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@aserdp](https://forums.percona.com/u/aserdp)\
**Post date:** [August 4, 2016, 12:03am UTC](https://forums.percona.com/t/difference-between-query-time-and-response-time/5019/1 "2016-08-04T00:03:27Z")

</div>

Version | 5.5.45-37.4-log Percona Server (GPL), Release 37.4, Revision 042e02b

Hi,

I am a bit confused on the difference between query\_time as reported in the mysql slow logs and the response time as reported by the Response Time Distribution (SHOW QUERY\_RESPONSE\_TIME;).

The confusion stems from the observation that the mysql slow logs shows the maximum query\_time as 347s (when checked with all logs).

While the distribution has entries  
±---------------±----------±---------------+  
| | | |  
±---------------±----------±---------------+  
| 0.000001 | 914 | 0.000000 |  
| 0.000010 | 11716670 | 25.632509 |  
| 0.000100 | 183210221 | 6030.333252 |  
| 0.001000 | 30203398 | 8305.915448 |  
| 0.010000 | 55028382 | 202486.117777 |  
| 0.100000 | 51674821 | 1644526.564266 |  
| 1.000000 | 7102115 | 2539651.042982 |  
| 10.000000 | 278069 | 572907.555653 |  
| 100.000000 | 6846 | 111699.020993 |  
| 1000.000000 | 31 | 9921.227099 |  
| [COLOR=#FF0000] 10000.000000 | 6 | 50372.869107 |  
| 100000.000000 | 47 | 520054.762721 |  
| 1000000.000000 | 0 | 0.000000 |  
| TOO LONG | 0 | TOO LONG |  
±---------------±----------±---------------+

As seen from the highlighted (red color fonts) there are 6 +47 =53 queries that are above the range of the maximum query\_time as reported in the slow logs

The above would either imply that the response\_time and query\_time from the two are different. If so what is the difference between them?  
Or if they are the same, then why did the mysql slow log not report/log 6+47 =53 query information.
