Querybuilder vs Traversal for a certain path

Avatar

Avatar

sandeepk7656774

Avatar

sandeepk7656774

sandeepk7656774

06-12-2017

Based on best practices​ following is a quote from the reference link

In case of scenario where we have a definite path to lookup (e.g. /content/geometrixx/home/,  under home say we have 500 pages). We can follow following approaches

Which one is better in this case and why it is recommended to avoid queries and use traversing instead?

Thanks,
Sandeep

Replies

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

06-12-2017

They stated when the node set is small it may better to iterate through the JCR Nodes. A larger node set, its much better to set up OAK indexes and query. See [1], [2]

1.  Oak Queries and Indexing

2. GEMS Session on OAK Index

Avatar

Avatar

sandeepk7656774

Avatar

sandeepk7656774

sandeepk7656774

06-12-2017

Thanks smacdonald2008 for response.

Is there a recommendation for the limit that Adobe recommends e.g. upto 500 nodes Traversal is better, more than that use indexes and queries.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

06-12-2017

Only best practices  for Querying is -- Best Practices for Queries and Indexing

I am pretty sure there is no hard limit. It what makes sense. In the case of 500 nodes - its too large for iterating.