Make hibernate generate_statistics configurable and false by default
GENERAL
TESTING
GENERAL
TESTING
Description
relates to
Activity
Show:
Earle Nietzel January 2, 2021 at 11:57 PM
If I recall this was on was because of the hibernate jmx statistics, but making it configurable makes it easy enough for those to switch it!
Fixed
Details
Details
Priority
Affects versions
Fix versions
Components
Assignee
Matthew Jones
Matthew JonesReporter
Matthew Jones
Matthew JonesLabels
Created January 2, 2021 at 12:50 PM
Updated April 2, 2021 at 3:22 PM
Resolved January 4, 2021 at 10:50 AM
While doing some work lately I found this useful property for hibernate performance tuning and checked that it was already enabled and not possible to disable.
In https://sakaiproject.atlassian.net/browse/KNL-1583#icft=KNL-1583 a setting was added to the hibernate properties for generate_statistics.
Every article I've read
https://thorben-janssen.com/how-to-activate-hibernate-statistics-to-analyze-performance-issues/
https://www.baeldung.com/hibernate-common-performance-problems-in-logs
indicates that having this true in production can lead to decreased performance. However it can be useful in development to uncover N+1 style issues. I think we should make this configurable and also document better how to use this property. I was seeing some potential N+1 issues in assignment yesterday as it looked to be doing an inefficient query when pulling down submissions.
I don't know the performance impact of having this on but there's no point if it's not even logged by default.