10000 Added information about lookahead index hint. (#861) · arangodb/docs@9cc5146 · 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.

Commit 9cc5146

Browse files
Lars Maierjsteemann
Lars Maier
andauthored
Added information about lookahead index hint. (#861)
* Added information about lookahead index hint. * Apply suggestions from code review Co-authored-by: Jan <jsteemann@users.noreply.github.com> * Update 3.10/indexing-multi-dim.md Co-authored-by: Jan <jsteemann@users.noreply.github.com> Co-authored-by: KVS85 <> Co-authored-by: Jan <jsteemann@users.noreply.github.com>
1 parent 3a3234e commit 9cc5146

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

3.10/indexing-multi-dim.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ FOR app IN appointments
126126
RETURN app
127127
```
128128

129+
## Lookahead Index Hint
130+
131+
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.
132+
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.
133+
134+
You can specify the lookahead value using the OPTIONS keyword:
135+
```js
136+
FOR app IN appointments OPTIONS {lookahead: 32}
137+
FILTER @to <= app.to
138+
FILTER app.from <= @from
139+
RETURN app
140+
```
129141
## Limitations
130142

131143
Currently there are a few limitations:

0 commit comments

Comments
 (0)
0