Optional allIf set to true, all possible execution plans will be returned as the
plans property. Otherwise only the optimal execution plan will be
returned as the plan property.
Default: false
Optional failIf set to true, the query throws an exception and aborts instead of
producing a warning. You should use this option during development to catch
potential issues early. When the attribute is set to false, warnings are
not propagated to exceptions and are returned with the query result.
Default: Controlled by the --query.fail-on-warning startup option.
Optional fullWhether to calculate the total number of documents matching the filter
conditions as if the query's final top-level LIMIT operation were not
applied. This option generally leads to different execution plans.
Default: false
Optional maxThe number of execution nodes in the query plan after that stack splitting is performed to avoid a potential stack overflow.
This option is only useful for testing and debugging and normally does not need any adjustment.
Default: Controlled by the --query.max-nodes-per-callstack startup option.
Optional maxMaximum number of plans that the optimizer is allowed to generate. Setting this to a low value limits the amount of work the optimizer does.
Optional maxLimits the number of warnings a query can return. You can increase or decrease the number with this option.
Default: 10
Optional optimizer?: { An object with a rules property specifying a list of optimizer rules to
be included or excluded by the optimizer for this query. Prefix a rule
name with + to include it, or - to exclude it. The name all acts as
an alias matching all optimizer rules.
Optional profile?: numberWhether to include additional query profiling information.
If set to 2, the response includes the time it took to process each
optimizer rule under stats.rules.
Default: 0
Options for explaining a query.
See databases.Database#explain.