pt-query-digest: a lot of information is removed when doing '--no-report --output'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In this particular case, I wanted to do some more complex groupby and ordering on a large slowlog which requires a lot of memory.
In order to be able to do this without gigabytes of memory and hours of wait time, I wanted to filter out most of the data first and create a smaller slowlog
But unfortunately all that data is lost when doing --no-report --output slowlog
What is lost:
- SET TIMESTAMP
- Time microsecond precision
- Rows_affected
- InnoDB_trx_id
- hostname
- Rows_read
- Bytes_sent
and many many more :(
To reproduce, run:
echo "
# Time: 130828 0:00:00.540005
# User@Host: masked[masked] @ [172.29.126.132]
# Thread_id: 352095 Schema: masked Last_errno: 0 Killed: 0
# Query_time: 0.000208 Lock_time: 0.000072 Rows_sent: 0 Rows_examined: 0 Rows_affected: 1 Rows_read: 0
# Bytes_sent: 11 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: DF756D
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: No Filesort_on_disk: No Merge_passes: 0
# InnoDB_IO_r_ops: 0 InnoDB_IO_r_bytes: 0 InnoDB_IO_r_wait: 0.000000
# InnoDB_
# InnoDB_
SET timestamp=
select 'we_love_daniel';
" | ./pt-query-digest --no-report --output slowlog
Then you will get:
# Time: 130828 0:00:00
# User@Host: masked[masked] @ []
# Thread_id: 352095
# Query_time: 0.000208 Lock_time: 0.000072 Rows_sent: 0 Rows_examined: 0
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: No Filesort_on_disk: No Merge_passes: 0
# InnoDB_IO_r_ops: 0 InnoDB_IO_r_bytes: 0 InnoDB_IO_r_wait: 0.000000
# InnoDB_
# InnoDB_
use masked;
select 'we_love_daniel'
;
Changed in percona-toolkit: | |
status: | New → Confirmed |
percona@ debian7: /data/percona$ ./pt-query-digest --version
pt-query-digest 2.2.4