Class NPlusOneQueryEntityFetchingEvent
java.lang.Object
io.hypersistence.optimizer.core.event.AbstractEvent
io.hypersistence.optimizer.hibernate.event.session.SessionEvent
io.hypersistence.optimizer.hibernate.event.session.NPlusOneQueryEntityFetchingEvent
- All Implemented Interfaces:
Event,Serializable
The
NPlusOneQueryEntityFetchingEvent indicates that an entity has been fetched
several times using secondary SQL queries instead of being fetched in one query
using a JOIN FETCH clause.
N+1 query issues can cause significant performance issues because,
even if each query is fast to execute, doing that tens or hundreds of times
just adds up, and the more the data grows with time,
the bigger the performance penalty will get.- Since:
- 2.6.0
- Author:
- Vlad Mihalcea
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.hypersistence.optimizer.core.event.Event
Event.Priority -
Field Summary
Fields inherited from interface io.hypersistence.optimizer.core.event.Event
HIDDEN_DESCRIPTION -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NPlusOneQueryEntityFetchingEvent
public NPlusOneQueryEntityFetchingEvent()
-
-
Method Details
-
getPriority
Get theEvent.Priorityof thisEvent- Specified by:
getPriorityin interfaceEvent- Overrides:
getPriorityin classSessionEvent- Returns:
- the
Event.Priorityof thisEvent
-