MarkLeith/dbahelper

statement_analysis views have duplicate digests

aadant opened this issue · 1 comments

Due to a change in MySQL 5.6.9,

"
This table was added in 5.6.5. Before MySQL 5.6.9, there is no SCHEMA_NAME column and grouping is based on DIGEST values only.
"

http://dev.mysql.com/doc/refman/5.6/en/statement-summary-tables.html

there are duplicates in this view because the statements are groupped by
(schema_name, digest).

So 2 possible solutions :

  1. add the schema name columns
  2. group by digest and aggregate the values

Fixed with this merge 500b9bf.

Thanks Arnaud for the fix!