简体   繁体   中英

Best index choice for Boolean type in OrientDB

I'm setting a flag on my records to see which ones have already been processed by my import script, and am wondering what type of index I should use. My thought is to use NOTUNIQUE_HASH_INDEX . Is that best?

Depends by what you need. All *_HASH_INDEX types are super fast but don't allow range queries like:

select from Invoice where date between '2014-01-01 00:00:00.000' and 
                                       '2014-12-31 00:00:00.000'

While classic index (sb-tree) can do it. About UNIQUE and NOT-UNIQUE depends if you can have duplication against the indexed fields. Like RDBMS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM