@@ -68,7 +68,7 @@ As you can see, the result details are very verbose. They are not covered in
68
68
detail for brevity in the next sections. Instead, let's take a closer look at
69
69
the results step by step.
70
70
71
- #### Execution nodes
71
+ #### Execution nodes of a query
72
72
73
73
In general, an execution plan can be considered to be a pipeline of processing steps.
74
74
Each processing step is carried out by a so-called * execution node*
@@ -116,7 +116,7 @@ Here is a summary:
116
116
- CalculationNode: calculates return value ` i.value `
117
117
- ReturnNode: returns data to the caller
118
118
119
- #### Optimizer rules
119
+ #### Optimizer rules used for a query
120
120
121
121
Note that in the example, the optimizer has optimized the ` SORT ` statement away.
122
122
It can do it safely because there is a sorted persistent index on ` i.value ` , which it has
@@ -162,7 +162,7 @@ Note that some rules may appear multiple times in the list, with number suffixes
162
162
This is due to the same rule being applied multiple times, at different positions
163
163
in the optimizer pipeline.
164
164
165
- Also see the full [ List of optimizer rules] ( #list-of- optimizer-rules ) below.
165
+ Also see the full list of [ optimizer rules] ( #optimizer-rules ) below.
166
166
167
167
#### Collections used in a query
168
168
@@ -490,12 +490,29 @@ Optimizer rules
490
490
491
491
### List of optimizer rules
492
492
493
- The following optimizer rules may appear in the ` rules ` attribute of a plan.
494
-
495
- Some rules may appear multiple times in the list of applied optimizations, with
496
- number suffixes like ` -2 ` , (e.g. ` remove-unnecessary-calculations-2 ` ). This is
497
- due to the same rule being applied multiple times at different optimization stages.
498
-
493
+ The following user-facing optimizer rules exist and are enabled by default
494
+ unless noted otherwise. You can
495
+ [ enable and disable optimizer rules] ( #turning-specific-optimizer-rules-off )
496
+ except for a few required rules.
497
+
498
+ Some rules exist multiple times with number suffixes like ` -2 ` ,
499
+ (e.g. ` remove-unnecessary-calculations-2 ` ). This is due to the same rule being
500
+ applied multiple times at different optimization stages.
501
+
502
+ {% comment %} Execute code but exclude its output from rendering
503
+
504
+ @startDocuBlockInline 00_dumpOptimizerRules_cluster
505
+ @EXAMPLE_ARANGOSH_RUN{00_dumpOptimizerRules_cluster}
506
+ var url = "/_api/query/rules";
507
+ var rules = internal.arango.GET(url);
508
+ assert(Array.isArray(rules));
509
+ assert(rules.some(e => e.clusterOnly));
510
+ var outfile = "Documentation/optimizer-rules.json"
511
+ assert(fs.write(outfile, JSON.stringify(rules, undefined, 2)));
512
+ @END_EXAMPLE_ARANGOSH_RUN
513
+ @endDocuBlock 00_dumpOptimizerRules_cluster
514
+
515
+ {% endcomment %}
499
516
{% assign rulesFile = page.version.version | remove: "." | append: "-optimizer-rules" -%}
500
517
{% assign options = site.data[ rulesFile] -%}
501
518
{% include aql-optimizer-rules.md options=options %}
0 commit comments