Bug #81021 Provide a function to return the query_digest text of a query

Submitted: 9 Apr 2016 6:42 Modified: 15 Jul 2016 12:09
Reporter: Simon Mudd Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: Optimizer, performance_schema

[9 Apr 2016 6:42] Simon Mudd
Description:
If you use P_S a lot and also want to look at the queries it would be convenient to be able to compare a query with the query digest. Currently there's no way to see what digest a query would generate thus it's not possible short of looking inside P_S.events_statements_* tables and the QUERY and DIGEST columns to see this information. If you collect information from various servers or you want to "work" on the digest information this is a little bit limiting.

How to repeat:
See above.

Suggested fix:
Please provide:
* a function QUERY_DIGEST(<query_string>) which returns the digest generated by the optimizer for the string given as input.
* a function QUERY_DIGEST_TEXT(<query_string>) which returns the digested QUERY_TEXT as shown in P_S.
[18 Jun 2016 21:37] Omer Barnir
Posted by developer:
 
Reported version value updated to reflect release name change from 5.8 to 8.0
[15 Jul 2016 12:09] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

Thanks,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.