Vishnu Aggarwal created OAK-9286:
------------------------------------

             Summary: Running query to fetch a node repository takes ~60 secs
                 Key: OAK-9286
                 URL: https://issues.apache.org/jira/browse/OAK-9286
             Project: Jackrabbit Oak
          Issue Type: Bug
            Reporter: Vishnu Aggarwal


We have an oak repository set up as the following structure under the root node 
with 4 different node types namely. One of the nodeTypes (cm:media) has ~10K 
nodes created for it.

We run the following query to get the desired result:
{code:java}
SELECT * FROM [cm:mediaFile] as node WHERE ISDESCENDANTNODE(node, 
"/mediafiles") AND LENGTH(node.[cm:oldUUID]) > 0 AND node.[cm:oldUUID] = 
"c6a958ef-2060-4599-ac72-d0a96d062180"{code}
While running the application on local machine, the query returns the result in 
~5 seconds while running the same query on the server, it takes around ~60 
seconds.

 

The stack being used is:

Grails 3.3.5

Java 8

Mysql 5.7.31 (on local) / aurora-mysql-5-7 - 5.7.12 (on server)

OAK 1.9.8

 

The repository has been constructed in the following manner:
{code:java}
DocumentNodeStoreBuilder documentNodeStoreBuilder = 
RDBDocumentNodeStoreBuilder.newRDBDocumentNodeStoreBuilder().setRDBConnection(actualDataSource)
documentNodeStoreBuilder.createMissingLastRevSeeker()
documentNodeStoreBuilder.createVersionGCSupport()
DocumentNodeStore documentNodeStore = documentNodeStoreBuilder.build()

repository = new Jcr(new Oak(documentNodeStore)).createRepository()
{code}
and, fetching the results through
{code:java}
session.getWorkspace().getQueryManager().createQuery(criteria, 
queryLanguage).execute().getNodes()
{code}
Any help or pointers on how it can be fixed?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to