in slow query log administrator commands seem to inherit counters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Apparently the application I'm working with is sending a ping command every so often which seems to be trashing slow query log with stats that later will break averages when aggregated. Here's few samples from slow query:
# User@Host: db[db] @ [192.168.100.33]
# Thread_id: 140286 Schema: db Last_errno: 0 Killed: 0
# Query_time: 0.007042 Lock_time: 0.000054 Rows_sent: 1 Rows_examined: 3 Rows_affected: 0 Rows_read: 0
# Bytes_sent: 688 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: 9FB2839
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: Yes Filesort_on_disk: No Merge_passes: 0
# InnoDB_IO_r_ops: 1 InnoDB_IO_r_bytes: 16384 InnoDB_IO_r_wait: 0.006665
# InnoDB_
# InnoDB_
SET timestamp=
SELECT query goes here...
# User@Host: db[db] @ [192.168.100.33]
# Thread_id: 140286 Schema: db Last_errno: 0 Killed: 0
# Query_time: 0.000008 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 3 Rows_affected: 0 Rows_read: 0
# Bytes_sent: 699 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: 9FB2839
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: Yes Filesort_on_disk: No Merge_passes: 0
# InnoDB_IO_r_ops: 1 InnoDB_IO_r_bytes: 16384 InnoDB_IO_r_wait: 0.006665
# InnoDB_
# InnoDB_
SET timestamp=
# administrator command: Ping;
# User@Host: db[db] @ [192.168.100.33]
# Thread_id: 138988 Schema: db Last_errno: 0 Killed: 0
# Query_time: 0.110581 Lock_time: 0.000057 Rows_sent: 1 Rows_examined: 2 Rows_affected: 0 Rows_read: 0
# Bytes_sent: 688 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: 9FB05E4
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: Yes Filesort_on_disk: No Merge_passes: 0
# InnoDB_IO_r_ops: 2 InnoDB_IO_r_bytes: 32768 InnoDB_IO_r_wait: 0.109936
# InnoDB_
# InnoDB_
use db;
SET timestamp=
SELECT query
# User@Host: db[db] @ [192.168.100.33]
# Thread_id: 138988 Schema: db Last_errno: 0 Killed: 0
# Query_time: 0.000007 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 2 Rows_affected: 0 Rows_read: 0
# Bytes_sent: 699 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: 9FB05E4
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: Yes Filesort_on_disk: No Merge_passes: 0
# InnoDB_IO_r_ops: 2 InnoDB_IO_r_bytes: 32768 InnoDB_IO_r_wait: 0.109936
# InnoDB_
# InnoDB_
SET timestamp=
# administrator command: Ping;
Server 5.1.55-rel12.5-log Percona Server (GPL), 12.5, Revision 200
Are you saying that having Admin commands (such as ping) is the problem? Your aggregation should probably exclude these (or show them separately). Please let me know if I'm missing something.