Issues
- WRITE Queries Response Time Statistics are not computedPS-4787Resolved issue: PS-4787
- Single variable to control logging in QRTPS-3944Resolved issue: PS-3944
- QRT compilation warning when linked staticallyPS-3841Resolved issue: PS-3841Przemyslaw Skibinski
- LP #1637431: plugin QUERY_RESPONSE_TIME does not workPS-3590Resolved issue: PS-3590
- LP #861834: setting enable_query_response_time_stats in my.cnf is not error pronePS-2693Resolved issue: PS-2693
- LP #1664473: 5.6 --repeat=2 test failuresPS-2238Resolved issue: PS-2238
- LP #1002848: Fails to compile on Arm/PPC in time_collectorPS-1916Resolved issue: PS-1916
- LP #1639808: Statistics collected in query response time tables are incorrectPS-1760Resolved issue: PS-1760
- LP #1552428: QUERY_RESPONSE_TIME_READ & QUERY_RESPONSE_TIME_WRITE broken if accessed through non-uppercase namePS-1701Resolved issue: PS-1701
- LP #1522651: query response times install instruction incompletePS-1677Resolved issue: PS-1677
- LP #1453277: query_response_time_range_base is not read on startupPS-1625Resolved issue: PS-1625
- LP #999309: Wrong execution time counting in INFORMATION_SCHEMA.QUERY_RESPONSE_TIME for stored proceduresPS-1249Resolved issue: PS-1249
- LP #1538019: Crash on attempting to execute non-existing prepared statement with QRT enabled | handle_fatal_signal (sig=11) in query_response_time_audit_notifyPS-963Resolved issue: PS-963
- LP #1426345: Prepared statements in stored procedures crash query response time pluginPS-874Resolved issue: PS-874
14 of 14
WRITE Queries Response Time Statistics are not computed
Won't Do
General
Escalation
General
Escalation
Description
Environment
None
Attachments
2
Smart Checklist
Details
Assignee
UnassignedUnassignedReporter
Peter ZaitsevPeter ZaitsevLabels
Affects versions
Priority
Medium
Details
Details
Assignee
Unassigned
UnassignedReporter
Peter Zaitsev
Peter ZaitsevLabels
Affects versions
Priority
Smart Checklist
Smart Checklist
Smart Checklist
Created August 28, 2018 at 10:52 PM
Updated March 4, 2025 at 9:06 PM
Resolved March 4, 2025 at 9:06 PM
Activity
Show:
Julia VuralMarch 4, 2025 at 9:06 PM
It appears that this issue is no longer being worked on, so we are closing it for housekeeping purposes. If you believe the issue still exists, please open a new ticket after confirming it's present in the latest release.
Michael CoburnFebruary 4, 2023 at 8:34 PMEdited
This is working for me on Percona Server for MySQL 5.7.38
[percona@percona-57 ~]$ mysql -D information_schema -e "select * from QUERY_RESPONSE_TIME_WRITE;"
+----------------+---------+----------------+
| TIME | COUNT | TOTAL |
+----------------+---------+----------------+
| 0.000001 | 0 | 0.000000 |
| 0.000010 | 0 | 0.000000 |
| 0.000100 | 6303476 | 457.047315 |
| 0.001000 | 1106091 | 136.353042 |
| 0.010000 | 305 | 0.687514 |
| 0.100000 | 9 | 0.270270 |
| 1.000000 | 0 | 0.000000 |
| 10.000000 | 0 | 0.000000 |
| 100.000000 | 0 | 0.000000 |
| 1000.000000 | 0 | 0.000000 |
| 10000.000000 | 0 | 0.000000 |
| 100000.000000 | 0 | 0.000000 |
| 1000000.000000 | 0 | 0.000000 |
| TOO LONG | 0 | TOO LONG |
+----------------+---------+----------------+
[percona@percona-57 ~]$ mysql --version
mysql Ver 14.14 Distrib 5.7.38-41, for Linux (x86_64) using 6.2
[percona@percona-57 ~]$ mysql -D information_schema -e "show plugins" -B | tail -4
QUERY_RESPONSE_TIME ACTIVE INFORMATION SCHEMA query_response_time.so GPL
QUERY_RESPONSE_TIME_AUDIT ACTIVE AUDIT query_response_time.so GPL
QUERY_RESPONSE_TIME_READ ACTIVE INFORMATION SCHEMA query_response_time.so GPL
QUERY_RESPONSE_TIME_WRITE ACTIVE INFORMATION SCHEMA query_response_time.so GPL
Lalit ChoudharySeptember 24, 2018 at 4:14 PM
Hi Peter,
Thank you for the report.
Validated against 5.7.23-23 Percona Server.
While testing observed that it's work fine few cases, test log attached.
Reproducible Test:
Did setup as per https://www.percona.com/doc/percona-server/LATEST/diagnostics/response_time_distribution.html
Ran sysbench:
initial count:
mysql [localhost] {msandbox} (information_schema) > select * from QUERY_RESPONSE_TIME_WRITE;
+----------------+-------+----------------+
| TIME | COUNT | TOTAL |
+----------------+-------+----------------+
| 0.000001 | 0 | 0.000000 |
| 0.000010 | 0 | 0.000000 |
| 0.000100 | 0 | 0.000000 |
| 0.001000 | 0 | 0.000000 |
| 0.010000 | 0 | 0.000000 |
| 0.100000 | 0 | 0.000000 |
| 1.000000 | 0 | 0.000000 |
| 10.000000 | 0 | 0.000000 |
| 100.000000 | 0 | 0.000000 |
| 1000.000000 | 0 | 0.000000 |
| 10000.000000 | 0 | 0.000000 |
| 100000.000000 | 0 | 0.000000 |
| 1000000.000000 | 0 | 0.000000 |
| TOO LONG | 0 | TOO LONG |
+----------------+-------+----------------+
14 rows in set (0.00 sec)
sysbench /usr/share/sysbench/oltp_read_write.lua --mysql_storage_engine=innodb --table-size=10001 --tables=10 --mysql-db=test --mysql-user=msandbox --mysql-password=msandbox --mysql-socket=/tmp/mysql_sandbox5723.sock --threads=3 --time=20 --report-interval=1 --events=0 --db-driver=mysql prepare
mysql [localhost] {msandbox} (information_schema) > select * from QUERY_RESPONSE_TIME_WRITE;
+----------------+-------+----------------+
| TIME | COUNT | TOTAL |
+----------------+-------+----------------+
| 0.000001 | 0 | 0.000000 |
| 0.000010 | 0 | 0.000000 |
| 0.000100 | 0 | 0.000000 |
| 0.001000 | 0 | 0.000000 |
| 0.010000 | 3 | 0.028829 |
| 0.100000 | 40 | 1.362902 |
| 1.000000 | 17 | 4.380406 |
| 10.000000 | 0 | 0.000000 |
| 100.000000 | 0 | 0.000000 |
| 1000.000000 | 0 | 0.000000 |
| 10000.000000 | 0 | 0.000000 |
| 100000.000000 | 0 | 0.000000 |
| 1000000.000000 | 0 | 0.000000 |
| TOO LONG | 0 | TOO LONG |
+----------------+-------+----------------+
14 rows in set (0.00 sec)
sysbench /usr/share/sysbench/oltp_read_write.lua --mysql_storage_engine=innodb --table-size=10001 --tables=10 --mysql-db=test --mysql-user=msandbox --mysql-password=msandbox --mysql-socket=/tmp/mysql_sandbox5723.sock --threads=3 --time=20 --report-interval=1 --events=0 --db-driver=mysql run
SQL statistics:
queries performed:
read: 82810
write: 23658
other: 11829
total: 118297
transactions: 5914 (295.39 per sec.)
queries: 118297 (5908.64 per sec.)
ignored errors: 1 (0.05 per sec.)
reconnects: 0 (0.00 per sec.)
Still WRITE Count is not changed.
mysql [localhost] {msandbox} (information_schema) > select * from QUERY_RESPONSE_TIME_WRITE;
+----------------+-------+----------------+
| TIME | COUNT | TOTAL |
+----------------+-------+----------------+
| 0.000001 | 0 | 0.000000 |
| 0.000010 | 0 | 0.000000 |
| 0.000100 | 0 | 0.000000 |
| 0.001000 | 0 | 0.000000 |
| 0.010000 | 3 | 0.028829 |
| 0.100000 | 40 | 1.362902 |
| 1.000000 | 17 | 4.380406 |
| 10.000000 | 0 | 0.000000 |
| 100.000000 | 0 | 0.000000 |
| 1000.000000 | 0 | 0.000000 |
| 10000.000000 | 0 | 0.000000 |
| 100000.000000 | 0 | 0.000000 |
| 1000000.000000 | 0 | 0.000000 |
| TOO LONG | 0 | TOO LONG |
+----------------+-------+----------------+
14 rows in set (0.01 sec)
I am running PS 5.7.22-22-log
I have enabled Response Time Statistics Plugin and I'm getting the data in the total and READ statistics:
mysql> select * from QUERY_RESPONSE_TIME_READ;
------------------------------------------
TIME
COUNT
TOTAL
------------------------------------------
0.000001
5
0.000000
0.000010
2141
0.016622
0.000100
13774335
648.664387
0.001000
5688819
1501.260428
0.010000
36821
276.306554
0.100000
1001279
15419.550763
1.000000
6
1.045871
10.000000
0
0.000000
100.000000
0
0.000000
1000.000000
0
0.000000
10000.000000
0
0.000000
100000.000000
0
0.000000
1000000.000000
0
0.000000
TOO LONG
0
TOO LONG
------------------------------------------
14 rows in set (0.00 sec)
However WRITE table is not populated
mysql> select * from QUERY_RESPONSE_TIME_WRITE;
---------------------------------------
TIME
COUNT
TOTAL
---------------------------------------
0.000001
0
0.000000
0.000010
0
0.000000
0.000100
0
0.000000
0.001000
0
0.000000
0.010000
0
0.000000
0.100000
0
0.000000
1.000000
0
0.000000
10.000000
0
0.000000
100.000000
0
0.000000
1000.000000
0
0.000000
10000.000000
0
0.000000
100000.000000
0
0.000000
1000000.000000
0
0.000000
TOO LONG
0
TOO LONG
---------------------------------------
14 rows in set (0.00 sec)
I run Sysbench so I know there are write queries and I see them in the processlist:
110190
sbtest
localhost
sbtest
Execute
0
updating
UPDATE sbtest1 SET k=k+1 WHERE id=39511
Disabling Prepared Statements did not fix the problem