Skip to content

Commit

Permalink
DOCS-16574 SBE Only in Group and Lookup Stage (#5919) (#6058)
Browse files Browse the repository at this point in the history
* DOCS-16574 SBE Only in Group and Lookup Stage

* CH feedback

* CH feedback

* *

* build error

* CH feedback 2/2
  • Loading branch information
ajhuh-mdb authored Jan 29, 2024
1 parent e1ab8d0 commit aa7054a
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions source/reference/sbe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,16 @@ MongoDB uses the classic engine for queries that are ineligible for the
Eligible Queries for the {+sbe-short-title+}
----------------------------------------------------

MongoDB can use the {+sbe-short+} for the following queries:
MongoDB determines eligibility for using the {+sbe-short+} on a per-query basis,
and considers support for each operator and expressions present in the query.
For example, two common pipelines that use {+sbe-short+} are aggregations with
:pipeline:`$group` or :pipeline:`$lookup` stages. However, support for the
{+sbe-short+} is version specific and actively changing.

- :pipeline:`$group` and :pipeline:`$lookup` pipeline stages when
specific conditions are met. For more information, see
:ref:`sbe-pipeline-optimizations`.
To see whether your query used the {+sbe-short+}, refer to the
:ref:`sbe-determine-query-engine` section.

- :pipeline:`$match` and :pipeline:`$project` pipeline stages that use
supported query operators and expressions.

- Certain :pipeline:`$sort` pipeline stages that do not include
:expression:`$meta` sorts.

- :method:`~db.collection.find()` queries that use supported query
operators and expressions.

.. note::

The {+sbe-short+} does not support :ref:`geospatial query operators
<query-operators-geospatial>`.
.. _sbe-determine-query-engine:

Determine which Query Engine was Used
-------------------------------------
Expand All @@ -67,7 +58,8 @@ Check Query Explain Results

The explain results for a query differ based on
which query engine was used. For example, explain results for queries
executed using the {+sbe-short+} include the ``explain.queryPlanner.winningPlan.slotBasedPlan`` field.
executed using the {+sbe-short+} include the
``explain.queryPlanner.winningPlan.slotBasedPlan`` field.

For more information about the differences in explain results between
query engines, see :ref:`explain-output-structure`.
Expand Down

0 comments on commit aa7054a

Please sign in to comment.