Using the ArangoDB Index with Edge Sets

Challenge: The fastest way to update multiple edge attributes. For performance reasons, I ignore graph methods and work with the collection directly for filtering.

ArangoDB 2.8b3

Request [Offer - Border Collection]:

FOR O In Offer
FILTER O._from == @from and O._to == @to and O.expired > DATE_TIMESTAMP(@newoffertime)
UPDATE O WITH { expired: @newoffertime } IN Offer
RETURN { _key: OLD._key, prices_hash: OLD.prices_hash }

I have a system index on _to, _from and range index on expired

Show request explanation

7   edge   Offer        false    false        49.51 %   [ `_from`, `_to` ]   O.`_to` == "Product/1023058135528"

The system index used to filter only part of the records (_to), and not for the index (_from, _to), 'expired', is also not used. Please explain to me the reasons for this behavior, and is it possible to indicate hints on the indices that will be used for the shortest path, if I know exactly when I plan the data model?

+4
1

, , ArangoDB . skiplist .

expired [ "_from", "_to" ], , , . , , , _to.

-, _from _to, _from _to. [ "_from", "_to" ], , _from _to . - , , , _to . .

- .

, , , _to. _from, , , 50% , , , - ( ) , .

_from _to , . , , , _from _to , () [ "_from", "_to", "expired" ], , .

+3

Source: https://habr.com/ru/post/1622453/


All Articles