|FetchGroupMonitor [message #1794494]
||Fri, 31 August 2018 11:04
| Marko Kanala
Registered: August 2018
I'm trying to optimize some queries in a complex system and we are extensively using FetchGroups to minimize database access. I'm trying to find out which attributes are accessed to miss the FetchGroups we already have defined to avoid loading the full objects from the database, with little success. It seems it is about impossible to get EclipseLink to log out attribute access before the actual queries are executed and logged.
The documentation at http://www.eclipse.org/eclipselink/documentation/2.6/solutions/performance002.htm says that
Task 3: Measure Fetch Group Field Usage
Use the Fetch Group Monitor to measure fetch group field usage. This can be useful for performance analysis in a complex system.
Enable this monitor by using the system property org.eclipse.persistence.fetchgroupmonitor=true.
The monitor outputs the attribute used for a class every time a new attribute is accessed.
.. but I don't understand how this monitor is supposed to work. We've enabled the profiler and tried enabling the PerformanceMonitor and the actual referenced monitor from persistence.xml and from the system property, as instructed. But nothing more is logged.
By inspecting the source code at
.. the class holds a single method "recordFetchedAttribute" which is (by my own inspection) never called from anywhere.
Question 1: Should this monitor work ? If so, how ? Or is this some legacy code which is not working anymore.
Question 2: Is there a way to somehow find out which attributes are accessed to trigger the load of the whole object (the attribute which don't hit the FetchGroup the objects originally were loaded with) ?
Thanks a lot!
Powered by FUDForum
. Page generated in 0.01630 seconds