Document the push_aggregation_through_join property
@@ -354,6 +354,27 @@ Optimizer Properties
The single distinct optimization will try to replace multiple ``DISTINCT`` clauses
with a single ``GROUP BY`` clause, which can be substantially faster to execute.
+``optimizer.push-aggregation-through-join``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ * **Type:** ``boolean``
+ * **Default value:** ``true``
+
+ When an aggregation is above an outer join and all columns from the outer side of the join
+ are in the grouping clause, the aggregation is pushed below the outer join. This optimization
+ is particularly useful for correlated scalar subqueries, which get rewritten to an aggregation
+ over an outer join. For example::
+
+ SELECT * FROM item i
+ WHERE i.i_current_price > (
+ SELECT AVG(j.i_current_price) FROM item j
+ WHERE i.i_category = j.i_category);
+
+ Enabling this optimization can substantially speed up queries by reducing
+ the amount of data that needs to be processed by the join. However, it may slow down some
+ queries that have very selective joins. This can also be specified on a per-query basis using
+ the ``push_aggregation_through_join`` session property.
+
``optimizer.push-table-write-through-union``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
