From e3a0e01c43a70099f6870a468d0cc3a8bdcb2775 Mon Sep 17 00:00:00 2001 From: Alena Rybakina Date: Mon, 26 Feb 2024 06:37:36 +0300 Subject: [PATCH] doc1 --- doc/src/sgml/config.sgml | 74 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 36a2a5ce431..47f82ca2dc9 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -5294,6 +5294,80 @@ ANY num_sync ( + enable_or_transformation (boolean) + + enable_or_transformation configuration parameter + + + + + Enables or disables in query planner's ability to transform multiple expressions in () + to a ANY expression (). + This transformations only apply under the following condition: + + + + Each expression should be formed as: expression operator (expression). + The right-hand side of the operator should be just a plain constant. + The left-hand side of these expressions should remain unchanged. + + + + + + + At the stage of index formation, a check is made on the restructuring of the plan using partial indexes or the formation of expressions combined by the "OR" operator. + + + + + + + Each expression form should return Boolean (true/false) result. + + + + + + + These expressions are logically linked in a OR condition. + + + + The default is on. + + + For example, the following query without setting enable_or_transformation is usually applied to the three filtering conditions separately, + but if we set enable_or_transformation, we combine the three expressions into only one expression: unique1 = ANY ('{1,2,3}'::integer[]) . + + EXPLAIN SELECT * FROM tenk1 WHERE unique1 = 1 or unique1 = 2 or unique1 = 3; + + QUERY PLAN + ------------------------------------------------------------- + Seq Scan on tenk1 (cost=0.00..482.50 rows=3 width=244) + Filter: (unique1 = ANY ('{1,2,3}'::integer[])) + + + + Another example is the following query with a given enable_or_transformation value, but we have generated a plan with partial indexes. + + EXPLAIN SELECT unique2, stringu1 FROM onek2 WHERE unique1 = 1 OR unique1 = PI()::integer; + QUERY PLAN + -------------------------------------------------- + Bitmap Heap Scan on onek2 + Recheck Cond: ((unique1 = 3) OR (unique1 = 1)) + -> BitmapOr + -> Bitmap Index Scan on onek2_u1_prtl + Index Cond: (unique1 = 3) + -> Bitmap Index Scan on onek2_u1_prtl + Index Cond: (unique1 = 1) + (7 rows) + + + + + enable_parallel_append (boolean) -- 2.34.1