Indexed queries on 2.2.26

18 views
Skip to first unread message

Erik T

unread,
Dec 10, 2018, 2:38:54 PM12/10/18
to OrientDB
I'm trying to create some indexed queries and I want to make sure I understand the documentation. What happens when an AND or OR is used with NOT or LIKE? Does the NOT force the whole query to avoid an index? Does a LIKE force the index to need a ranged query for everything?

Luigi Dell'Aquila

unread,
Dec 11, 2018, 2:46:49 AM12/11/18
to orient-...@googlegroups.com
Hi Erik,

In general:
- queries with NOT are not indexed
- LIKE operator cannot be used with indexes in general
- AND operations can be indexed if you have a multi-property index, but not on multiple indexes on the same query
- the new SQL executor in v 3.0 is much smarter at query optimization and index usage, so if you have a chance to upgrade I strongly suggest you to do so

Thanks

Luigi

Il giorno lun 10 dic 2018 alle ore 20:38 Erik T <erik....@gmail.com> ha scritto:
I'm trying to create some indexed queries and I want to make sure I understand the documentation. What happens when an AND or OR is used with NOT or LIKE? Does the NOT force the whole query to avoid an index? Does a LIKE force the index to need a ranged query for everything?

--

---
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-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Erik T

unread,
Dec 11, 2018, 7:45:44 AM12/11/18
to orient-...@googlegroups.com
I'm unable to upgrade to v3 at this point some I'm stuck trying to figure out what actually happens in the lower levels.

Are there exceptions to the rules you gave?
Erik


You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/LWH9pAlhWJs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

Luigi Dell'Aquila

unread,
Dec 17, 2018, 3:03:03 AM12/17/18
to orient-...@googlegroups.com
Hi Erik,

Let's say that there are possible work-arounds. In particular, instead of using LIKE operator, you can use LUCENE or FULLTEXT indexes.

Thanks

Luigi
Reply all
Reply to author
Forward
0 new messages