Skip to content

Commit c2615b9

Browse files
authored
Async prefetching AQL optimizer rule (#410)
1 parent 681ad95 commit c2615b9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,31 @@ Therefore, you should only set the `readOwnWrites` option to `false` if you can
190190
guarantee that the input of the `UPSERT` leads to disjoint documents being
191191
inserted, updated, or replaced.
192192

193+
### Parallel execution within an AQL query
194+
195+
The new `async-prefetch` optimizer rule allows certain operations of a query to
196+
asynchronously prefetch the next batch of data while processing the current batch,
197+
allowing parts of the query to run in parallel. This can lead to performance
198+
improvements if there is still reserve (scheduler) capacity.
199+
200+
The new `Par` column in a query explain output shows which nodes of a query are
201+
eligible for asynchronous prefetching. Write queries, graph execution nodes,
202+
nodes inside subqueries, `LIMIT` nodes and their dependencies above, as well as
203+
all query parts that include a `RemoteNode` are not eligible.
204+
205+
```aql
206+
Execution plan:
207+
Id NodeType Par Est. Comment
208+
1 SingletonNode 1 * ROOT
209+
2 EnumerateCollectionNode ✓ 18 - FOR doc IN places /* full collection scan */ FILTER (doc.`label` IN [ "Glasgow", "Aberdeen" ]) /* early pruning */
210+
5 CalculationNode ✓ 18 - LET #2 = doc.`label` /* attribute expression */ /* collections used: doc : places */
211+
6 SortNode ✓ 18 - SORT #2 ASC /* sorting strategy: standard */
212+
7 ReturnNode 18 - RETURN doc
213+
```
214+
215+
The profiling output for queries includes a new `Par` column as well, but it
216+
shows the number of successful parallel asynchronous prefetch calls.
217+
193218
### Added AQL functions
194219

195220
The new `PARSE_COLLECTION()` and `PARSE_KEY()` let you more extract the

0 commit comments

Comments
 (0)