Hi, On Wed, Feb 17, 2010 at 6:44 PM, Boomah <nickda...@gmail.com> wrote: > ...I set up a TransientRepository and added a node for each "Contract" with a > unique path. I then set a property on this node called id with the > associated string value of the id: > > node.setProperty("id", "123") > > I have a lot of these (about 200000) and when I do a search on the id using: > > "SELECT * FROM [nt:unstructured] WHERE id = '123' > > it seems to take longer than I would expect....
Can't you make the id part of the unique path of each contract? In this way you would use tree navigation instead of queries to find a node, much faster. Note that it's not recommended to have too many (> 10K) child nodes for the same parent, so you'd need to break down your paths, storing ID 123456 under /contracts/12/34/123456 for example. -Bertrand