jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <bdelacre...@apache.org>
Subject Re: A couple of simple questions
Date Thu, 18 Feb 2010 10:19:15 GMT

On Wed, Feb 17, 2010 at 6:44 PM, Boomah <nickdarcy@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.


View raw message