8000 Added information about lookahead index hint. by maierlars · Pull Request #861 · arangodb/docs · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Added information about lookahead index hint. #861

Merged
merged 4 commits into from
Jan 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions 3.10/indexing-multi-dim.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ FOR app IN appointments
RETURN app
```

## Lookahead Index Hint

Using the lookahead index hint can increase the performance for certain use cases. Specifiying a lookahead value greater than zero makes the index fetch more documents that are no longer in the search box, before seeking to the next lookup position.
Because the seek operation is computationally expensive, probing more documents before seeking may reduce the number of seeks, if matching documents are found. Please keep in mind that it might also affect performance negatively if documents are fetched unnecessarily.

You can specify the lookahead value using the OPTIONS keyword:
```js
FOR app IN appointments OPTIONS {lookahead: 32}
FILTER @to <= app.to
FILTER app.from <= @from
RETURN app
```
## Limitations

Currently there are a few limitations:
Expand Down
0