Expand my Community achievements bar.

SOLVED

Usage of Query builder or SQL2 in AEM as cloud service

Avatar

Level 5

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 ?  

1 Accepted Solution

Avatar

Correct answer by
Level 1

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/troubleshooti...

 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 1

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/troubleshooti...