Hi all,


I built a tree in orientdb with a high amount of nodes and edges in bottom 
up direction. I would like to receive all leaves of that tree (each leaf 
has the @class LEAF) which match a certain range condition (e.g. val > 150 
and val < 300):


Example: 


       o
     /   \
    o     o 
   /    /  \ 
  o    o    o
 210  120   /\
          270 180
 

Result: 210, 180, 270


What I tried so far is to use the following query:

SELECT FROM(TRAVERSE IN() FROM #123:123) WHERE value > 150 and value < 300
 

This is working well with a few elements but the performance drops with 
increasing amount of leafs. So my questions are:

   1. Is this the most efficient way to do this in OrientDB, especially if 
   I have let's say 300000 leaves under each node ? 
   2. I know from the documentation, that using an index can help to 
   improve the performance on range queries, but would the index be used in 
   this case? My first assumption is no because orient is first traversing and 
   then filtering the the traversed elements isn't it?

Thanks and Regards
Jon

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/orient-database/60c7ebba-015c-4682-b9ba-5770ccecb600%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to