Hi everyone,

(sorry for the long post to follow!)

We have an existing platform relying on CouchDB (Cloudant, actually) and 
I'm evaluating a potential migration to Neo4j. The good thing with having 
an existing version is that I've already been through many pitfalls, so now 
I can consider them with Neo4j. One of them is *pagination*.

CouchDB has a 'skip' feature that is similar to Neo4j. The doc clearly 
states that it should not be used for pagination, because it incurs 
potential performance issues when skipping lots of large pages (if you take 
10 items by skipping 10, the DB will still fetch 20 and return the last 10).

*So first question*: is it the same with Neo4j?

In case it is (and I believe it is!), I would like to see whether CouchDB's 
approach to pagination would be applicable. The strategy here is to fetch 
n+1 items, and pass the last one as a cursor/bookmark than will be used as 
a starting point for the next query. This sounds easy, but gets tricky if 
you order by a field that is not unique. Let me take an example.

Say I have this kind of node: 
(:Node {id:"unique-string", name:"not-unique-string"})

*My second question is*: if I want to query these nodes, ordered by name, 
is there a way to implement the cursor technique I mentioned before?

Also, *subsidiary question*: I've read that 'order by' incurs a full scan, 
but is it also the case if I index the targeted field?

Thanks all for helping me get familiar with that exciting platform!
Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to