Reputation: 21
In our installations of MySQL 5.7 at work, the table performance_schema.events_statements_summary_by_digest is recording all different SQL SELECT statements that use views under the same DIGEST/DIGEST_TEXT (Actually, the DIGEST of the view).
I searched a lot but could not find anything related to the issue. Anyone knows if there is some configuration/workaround in performance schema to record the statements individually?
Example:
Consider these two statements below:
select * from my_view where id = 1;
select * from my_view where id = 1 and value_a = 1;
They both are recorded under the same DIGEST/DIGEST_TEXT:
DIGEST: 49eb6a7a1af263407e1f85cd3ca8f515
DIGEST_TEXT: ( SELECT teste
. my_table
. id
AS id
, teste
. my_table
. value_a
AS value_a
, teste
. my_table
. value_b
AS value_b
, teste
. my_table
. value_c
AS value_c
FROM teste
. my_table
)
The DIGEST_TEXT is the text used in the create view.
The result is the same independently of the algorithm used in the create view (MERGE/TEMPTABLE).
Upvotes: 1
Views: 935
Reputation: 21
Unfortunately, that is the expected behavior. It was not explained why.
But it can be added as a feature request.
Here is the thread:
https://bugs.mysql.com/bug.php?id=89559
Upvotes: 1