Hi, the main difference between trees and hashes is that trees are
optimized for range queries.

For example if your query has this clause:
... WHERE number < 5 AND number > 10
I would suggest you a tree based index.

Otherwise if the query is:
.. WHERE value = 5 OR value = 10
I would suggest you a hash based index.

The other consideration is if create a UNIQUE or NOT UNIQUE index.
Consider the query:
.... WHERE value = 5
If you are sure that the first vertex found with value=5 is the only one
you will ever find, it's UNIQUE.
In case of UNIQUE index the data structure used to store the index is
simpler, and it will result in better performances.

I also suggest you to read the documentation on orientdb website, since
it's updated: http://www.orientechnologies.com/docs/last/

Riccardo

2015-03-10 9:52 GMT+01:00 CasperCLD <[email protected]>:

> I'm going to implement OrientDB as our graph database. We won't perform
> full-text/spatial searches on it, but solely queries like: 'What are the
> adjacent vertexes of this vertex?'.
> I know that Lucene is optimised for full-text/spatial searches (which is
> not appropriate), so this leaves me to index my data with either SB-Tree or
> 'Hash' (according to
> https://github.com/orientechnologies/orientdb/wiki/Indexes).
>
> Now my question is what would be the best option for this scenario? Could
> you explain your answer?
> Thanks
>
> Casper
>
> --
>
> ---
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to