Efficiency of delete from manual index using @rid (And possible bug in 2.2.29)

19 views
Skip to first unread message

Eric24

unread,
Nov 12, 2017, 11:05:22 PM11/12/17
to OrientDB
While it's easy enough to delete rows from a manual index by @rid (using DELETE FROM INDEX:testindex WHERE rid = #10:4), is the index structured in a way that this is efficient? In other words, does ODB have to essentially read through the entire index to find all of the occurrences of @rid #10:4 to delete or is there any sort of optimization in place to prevent this? I'm concerned about using this approach on manual indexed that could have millions of records.

Also, I noticed that doing something like SELECT key FROM INDEX:textindex (WHERE...) doesn't work if the index has a composite key (works fine on simple keys). A bug or is there a different syntax that will work with composite keys?

Luigi Dell'Aquila

unread,
Nov 13, 2017, 3:22:13 AM11/13/17
to orient-...@googlegroups.com
Hi Eric,

The index is optimized to do lookups by key, not by RID, so I'd say the answer is no, it won't be efficient.

About the SELECT, it's not an expected behavior, I'll check it

Thanks

Luigi


2017-11-13 5:05 GMT+01:00 Eric24 <er...@24x8.com>:
While it's easy enough to delete rows from a manual index by @rid (using DELETE FROM INDEX:testindex WHERE rid = #10:4), is the index structured in a way that this is efficient? In other words, does ODB have to essentially read through the entire index to find all of the occurrences of @rid #10:4 to delete or is there any sort of optimization in place to prevent this? I'm concerned about using this approach on manual indexed that could have millions of records.

Also, I noticed that doing something like SELECT key FROM INDEX:textindex (WHERE...) doesn't work if the index has a composite key (works fine on simple keys). A bug or is there a different syntax that will work with composite keys?

--

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

Reply all
Reply to author
Forward
0 new messages