Usage of Query builder or SQL2 in AEM as cloud service | Community
Skip to main content
Level 4
April 19, 2023
Solved

Usage of Query builder or SQL2 in AEM as cloud service

  • April 19, 2023
  • 1 reply
  • 697 views

Hi Team,

 

If we use Query builder or SQL2 query in sling model to fetch the records  . is there will be any issue or impact on performance in production or this is not recommended to use in AEM as cloud ?  

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 Karthik_Bhat_

Hi @sonuk85184451 

We can use Query Builder.

Impact wise, it depends on the query what we are running. if query takes longer time to load or if huge amount of nodes to be traversed it will impact the performance in the envionment.

And also by default it will be able to traverse only100000 nodes, post that it will abort the query execution.

So,

  • We have to optimize the query as much as possible.
  • If it process/traverse through high amount of nodes then we can also use the concept of OAK indexing and pagination.

Hope this answers your question.

FYR - https://experienceleague.adobe.com/docs/experience-manager-64/developing/bestpractices/troubleshooting-slow-queries.html?lang=en

 

1 reply

Karthik_Bhat_
Karthik_Bhat_Accepted solution
April 19, 2023

Hi @sonuk85184451 

We can use Query Builder.

Impact wise, it depends on the query what we are running. if query takes longer time to load or if huge amount of nodes to be traversed it will impact the performance in the envionment.

And also by default it will be able to traverse only100000 nodes, post that it will abort the query execution.

So,

  • We have to optimize the query as much as possible.
  • If it process/traverse through high amount of nodes then we can also use the concept of OAK indexing and pagination.

Hope this answers your question.

FYR - https://experienceleague.adobe.com/docs/experience-manager-64/developing/bestpractices/troubleshooting-slow-queries.html?lang=en