I'm pretty sure having a list of 1000s of properties on a multi-value property is would be a very bad thing to try frankly. Most of the API will be trying to read them all at once I think, and not even support what you're trying. I'd say you should really use nodes for this. But beware, even then having a single parent with 1000s of children has also been known to be problematic for people. The tree is good at going very 'deep' but not very 'wide' on any given branch (i.e. child counts too large is a problem), but if you figure a way to go 'deep' (not wide) that still CAN have good performance becuse using DESCENDANTOF to search under a specific branch on the tree is highly perofrmant even on large trees. > 10,000 (or eve millions)
Best regards, Clay Ferguson [email protected] On Thu, Feb 2, 2017 at 2:38 PM, Hayes, Michael <[email protected]> wrote: > Hello, > > I am trying to come up with a JCR-SQL2 query that will return nodes that > have a multi-value property containing a value in a range. > > Example Data (data_value is LONG type) > > Node A > > - data_value: 1, 2, 4, 5 > Node B > > - data_value: 1, 2, 3, 4, 5 > > SELECT * FROM [nt:base] WHERE data_value > 2; > Returns Node A and B. > > SELECT * FROM [nt:base] WHERE data_value < 4; > Returns Node A and B. > > SELECT * FROM [nt:base] WHERE data_value > 2 AND data_value < 4; > Returns Node A and B, however, I want it to just return Node B since it is > the only node that has a data_value between 2 and 4. > > Is there some way to do this in the JCR-SQL2? I have tried doing some > inner joins with no luck. > > Is there a better way to structure the data so that it is semantically > equivalent and easier to query? It might end up with tens of thousands of > values or more. > I was thinking of maybe having a child node for each value but not sure > how that would scale. > > Any advice appreciated. > -Mike >
