Having problem with Query builder when we have more records

Avatar

Avatar

umamaheswariy46

Avatar

umamaheswariy46

umamaheswariy46

17-09-2019

Having problems with the querybuilder.

We have our own dashboards for the clients. The data comes into these dashboards based on properties defined in the nodes.

To display these dashboards we are using querybuilder api to get the data but recently seeing so many issues like reached 10000 stopping the process etc.

Is there any way that we can optimize the queries or best way to retrieve the data without this msg. That would be great.

Thanks in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Ravi_Pampana

MVP

Avatar

Ravi_Pampana

MVP

Ravi_Pampana
MVP

17-09-2019

Hi,

You can update the below configuration

Screen Shot 2019-09-17 at 7.20.08 PM.png

In memory read limit property can be increase to your needs.

But note this is impact the performance of the server and you should be adding proper indexing for the properties, so that performance wont be effected.

Hope this helps !

Answers (2)

Answers (2)

Avatar

Avatar

SonDang

Employee

Avatar

SonDang

Employee

SonDang
Employee

17-09-2019

Have you considering using the parameter "p.limit" as described here [1].

[1] Query Builder API

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

17-09-2019

As a short term solution, you can change the "LimitReads" at [3] to a higher number.

For long term:

- First, try to find the query that is getting triggered by setting up a DEBUG logger on the following classes:

  • org.apache.jackrabbit.oak.plugins.index
  • org.apache.jackrabbit.oak.query
  • com.day.cq.search

Then use the explain query[1] tool to find the index that query is using. Then try to optimize the index Or create a new index if its a traversal query. You can use the oakutils[2] tool for index definition.

[1] http://<host>:<port>/libs/granite/operations/content/diagnosistools/queryPerformance.html

[2] Oak Utilities : Index Definition Generator

[3] http://<host>:<port>/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3Dsettings%2Ctype%3DQueryEngineSettings