Luke, Sorry for the late response.
ArangoDB has a query optimizer, that will use an index - if possible. For example, if you have a sorted index (e.g. skip-list) on NAME and you use a filter like NAME >= "Anton", then it will use this index when filtering. On the other hand, if no such index is defined it will use a full-collection scan. You can use explain, to verify which index is use (see https://docs.arangodb.com/3.0/Manual/Indexing/IndexUtilization.html). Filter using OR are inherently. For example, NAME == "Anton" OR NAME == "Berta" might still use an index. But NAME == "Anton" OR AGE == 42 might not be able to use an index. Best, Claudius Am 9. September 2016 um 19:12:03, Yang Luke (ly...@intellectspace.com) schrieb: It is the performance question - here what I need to understand is that how AQL is implemented underneath concerning filter. Does it use index built upon particular data field in order to select the matching records or AQL has the option to sequentially scan and select the matching records on the subset of the records -- which are identified by the pre-selected record Ids (of course independent)? In our scenario, comparing full collection's 100M records vs pre-selected, saying 5K, I am wondering how better the performance can be achieved using AQL filter (if it relies on the collection based index) vs purely scanning the pre-selected records to identify the final set of matching records ? There could be multiple filters with quite complex AND/OR operations. Thanks, Luke On Fri, Sep 9, 2016 at 9:46 AM, Claudius Weinberger <claud...@arangodb.com> wrote: > Let me try to answer your questions: > > 1) I'm not completely sure what you mean. Are you asking if AQL can > express such things or if AQL is performant enough? > > 2) We have customers which much more data and a lot of indexes. If an > index is useful depends on your query. But you use the explain command on > your queries to decide that. > > 3) There are different ways to do that. Are your queries to pre-selected > Ids going in direction of ranges or are pre-selected Ids independent? > > > > Am Donnerstag, 8. September 2016 17:24:03 UTC+2 schrieb Luke Yang: >> >> We have a design scenario: >> 1) 100M+ records in a collection, multiple indexes on records and filters >> used for searching the records >> 2) Desired Record key or Ids can be pre-selected or determined during the >> actual searching >> 3) We want to search the final set of record key or Ids based on 2) + >> multiple filters (with which indexes are built upon) >> >> Question: >> 1) How good ArangoDB Query can handle this? >> 2) Since indexes are built based on 100M+ records (assuming the full >> collection), do multiple filters work effectively? What kind of algorithm >> is used in the implementation? >> 3) Since we have pre-selected Ids for the records, the most effective >> approach is to search on this subset of data, does ArangoDB have the >> mechanism to do that? >> >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "ArangoDB" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/arangodb/NghTaFRCIp0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > arangodb+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.