You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the pattern you'd like to propose
As a software developer or architect, I want to reduce the number of database requests, so that the application performs its operations more efficiently in terms of latency, overall run time, and energy consumption.
Especially ORM tools like Hibernate in Java can execute additional, unwanted queries if relationships between entities are wrongly configured.
Describe specific emission impact from this pattern
Reducing the number of database requests reduces the amount of blocking I/O operations, which improves the overall performance of the application and thereby reduces its energy consumption.
SCI score: SCI = (E * I) + M per R
The energy consumed (E) is reduced by reducing the amount of requests that travel the network, and by reducing the execution time of services, so they can be scaled down earlier.
References to this pattern
I haven't seen this as a pattern, but I eager/lazy loading issues in Hibernate/JPA are a well known problem (e.g. N+1 problem).
Additional context
A selected use case performs an operation on a large dataset resulting in too many database requests, such as N+1 requests, where N is the amount of items in the dataset, and +1 refers to an additional request to fetch an eagerly loaded relation for each item.
The issue of too many database requests may also arise from lazy loaded relations that are accessed after the initial fetch of the dataset.
Hi @j-ruch ,
at the moment we are in the phase of re-categorizing our patterns catalog, which leads to a delay for reviewing open issues. We will have a look, when we finished creating our new structure to categorize patterns.
Activity
russelltrow commentedon Nov 24, 2025
Hey @j-ruch thank you so much for proposing a new pattern.
@franziska-warncke @LiyaMath can you please review and provide your feedback.
franziska-warncke commentedon Dec 19, 2025
Hi @j-ruch ,
at the moment we are in the phase of re-categorizing our patterns catalog, which leads to a delay for reviewing open issues. We will have a look, when we finished creating our new structure to categorize patterns.
Many thanks and have a good time!