Query builder query Limitation in fetching results | Community
Skip to main content
Anny0505
Community Advisor
Community Advisor
September 24, 2021
Solved

Query builder query Limitation in fetching results

  • September 24, 2021
  • 3 replies
  • 2244 views

I'm trying to understand the how many nodes I can traverse through Query builder query and fetch data from the repository without impacting AEM system performance?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrianKasingli

For AEM 6.0 - 6.2 versions, you can tune the threshold for node traversal via JVM parameters in the AEM start script to prevent large queries from overloading the environment. The recommended values are :

  • -Doak.queryLimitInMemory=500000
  • -Doak.queryLimitReads=100000

for the original post, you can find it here, https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/the-query-read-more-than-500000-nodes-in-memory/m-p/294303

3 replies

BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
September 24, 2021

For AEM 6.0 - 6.2 versions, you can tune the threshold for node traversal via JVM parameters in the AEM start script to prevent large queries from overloading the environment. The recommended values are :

  • -Doak.queryLimitInMemory=500000
  • -Doak.queryLimitReads=100000

for the original post, you can find it here, https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/the-query-read-more-than-500000-nodes-in-memory/m-p/294303

Anny0505
Community Advisor
Anny0505Community AdvisorAuthor
Community Advisor
September 25, 2021

Is it applicable for  latest version of AEM?

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 27, 2021

yes

Sanjay_Bangar
Community Advisor
Community Advisor
September 25, 2021

Hi @anny0505 ,

     The recommended values are 

-Doak.queryLimitInMemory=500000

-Doak.queryLimitReads=100000

 

Kr,

Sanjay

joerghoh
Adobe Employee
Adobe Employee
September 27, 2021

I think that the question requires 2 distinct answers.

First, the response by @briankasingli is somehow correct, because it describes the limit of queries. Actually not in terms of the number of response nodes read from the query, but from the number of nodes which are traversed. In the extreme case that's the same number, but in many cases you can fetch much less nodes from the query than indicated by these limits.

 

The 2nd part of the response is, that you should refine your query as good as you can. And trying to avoid to craft queries, which return very large result sets and traversing them completly. Because this could hit the limits (as outlined by Brian), on the other hand side because it's typically not really fast. And the performance can play a role, depending on the context of the query.