
pt-query-digest --since "2024-09-13 09:00:00" --until "2024-09-13 11:00:00" /data/mysql_8/data/test_dan-slow.log
# No events processed.
[root@test_dan data]# tail -30 test_dan-slow.log
select * from t1 limit 3;
# Time: 2024-09-10T16:23:22.038451+08:00
# User@Host: root[root] @ localhost [] Id: 8
# Query_time: 0.130521 Lock_time: 0.096975 Rows_sent: 2 Rows_examined: 5
SET timestamp=1725956601;
(select 1000 as f) union (select id from t1 order by id desc limit 2);
/usr/local/mysql8/bin/mysqld, Version: 8.0.18 (MySQL Community Server - GPL). started with:
Tcp port: 3338 Unix socket: /tmp/mysql_3338.sock
Time Id Command Argument
# Time: 2024-09-13T09:38:11.289432+08:00
# User@Host: root[root] @ localhost [] Id: 8
# Query_time: 0.605194 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 1
SET timestamp=1726191490;
select @@version_comment limit 1;
# Time: 2024-09-13T10:01:06.965911+08:00
# User@Host: root[root] @ localhost [] Id: 8
# Query_time: 0.772177 Lock_time: 0.225260 Rows_sent: 1 Rows_examined: 594
SET timestamp=1726192866;
show variables like '%datadir%';
# Time: 2024-09-13T10:07:22.378684+08:00
# User@Host: root[root] @ localhost [] Id: 8
# Query_time: 0.117331 Lock_time: 0.061207 Rows_sent: 4 Rows_examined: 4
use dba;
SET timestamp=1726193242;
select * from tab2;
# Time: 2024-09-13T10:08:19.927779+08:00
# User@Host: root[root] @ localhost [] Id: 8
# Query_time: 20.010737 Lock_time: 0.000119 Rows_sent: 4 Rows_examined: 4
SET timestamp=1726193279;
select *,sleep(5) from tab2;