[hibernate-issues] [JIRA] (HHH-13928) Allow listening to query execution and execution times

Philippe Marschall (JIRA) jira at hibernate.atlassian.net
Sun Apr 5 07:51:39 EDT 2020


Philippe Marschall ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A602e189e-e9da-4953-9230-5d5f03a04545 ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYjM3MDVmMzVkNWE3NDg0OTk5MTJjNzIzZGI1NGIxNzQiLCJwIjoiaiJ9 ) / New Feature ( https://hibernate.atlassian.net/browse/HHH-13928?atlOrigin=eyJpIjoiYjM3MDVmMzVkNWE3NDg0OTk5MTJjNzIzZGI1NGIxNzQiLCJwIjoiaiJ9 ) HHH-13928 ( https://hibernate.atlassian.net/browse/HHH-13928?atlOrigin=eyJpIjoiYjM3MDVmMzVkNWE3NDg0OTk5MTJjNzIzZGI1NGIxNzQiLCJwIjoiaiJ9 ) Allow listening to query execution and execution times ( https://hibernate.atlassian.net/browse/HHH-13928?atlOrigin=eyJpIjoiYjM3MDVmMzVkNWE3NDg0OTk5MTJjNzIzZGI1NGIxNzQiLCJwIjoiaiJ9 )

Issue Type: New Feature Affects Versions: 5.4.13 Assignee: Unassigned Components: hibernate-core Created: 05/Apr/2020 04:51 AM Priority: Major Reporter: Philippe Marschall ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A602e189e-e9da-4953-9230-5d5f03a04545 )

When analyzing performance issues it is helpful to know which SQL queries have been executed and how log they took. The current mechanisms offered by Hibernate are inadequate for building custom tools.

* slow query logging is not extensible, if you want to have access to the information you need to write a custom log appender and parse the log message, see https://discourse.hibernate.org/t/custom-sqlstatementlogger/3881
* `StatementInspector` does not have access to the execution time

In our specific case we would like the generate a JFR event recording the query and it's execution time. This can then be combined with other JFR events to find you which queries for executed for processing a single request, how often they were executed and how long their execution took.

( https://hibernate.atlassian.net/browse/HHH-13928#add-comment?atlOrigin=eyJpIjoiYjM3MDVmMzVkNWE3NDg0OTk5MTJjNzIzZGI1NGIxNzQiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-13928#add-comment?atlOrigin=eyJpIjoiYjM3MDVmMzVkNWE3NDg0OTk5MTJjNzIzZGI1NGIxNzQiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100124- sha1:7217f9f )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200405/560b327f/attachment.html 


More information about the hibernate-issues mailing list