cancel
Showing results for 
Search instead for 
Did you mean: 

Avoiding second match while returning total count and limited results

deepak
Node Clone

This has been asked before. I am just checking if we found a better way since this was posted:

https://community.neo4j.com/t5/neo4j-graph-platform/get-count-before-limit/td-p/38055

https://stackoverflow.com/questions/44478680/getting-results-count-from-a-query-with-limit-clause

https://stackoverflow.com/questions/29593998/can-you-get-the-full-count-of-result-even-when-using-li...

1. I find it weird writing 2 MATCH queries, one for count and one for returning a subset of results (with SKIP/LIMIT). Is this still the recommended approach?

2. This SO post by @michael.hunger recommends running 2 MATCH queries over 1 query and collecting sliced results for skip/limit. Can someone please explain why running 2 queries is more efficient?

0 REPLIES 0