Doc: mention that extended stats aren't used for joins
authorDavid Rowley <[email protected]>
Thu, 22 Jun 2023 00:47:53 +0000 (12:47 +1200)
committerDavid Rowley <[email protected]>
Thu, 22 Jun 2023 00:47:53 +0000 (12:47 +1200)
Statistics defined by the CREATE STATISTICS command are only used to
assist with the selectivity estimations of base relations, never for
joins.  Here we mention this fact in the notes section of the CREATE
STATISTICS command.

Discussion: https://postgr.es/m/CAApHDvrMuVgDOrmg_EtFDZ=AOovq6EsJNnHH1ddyZ8EqL4yzMw@mail.gmail.com
Backpatch-through: 11

doc/src/sgml/ref/create_statistics.sgml

index e3e5c297ddb16f54d0f4479da088ca3dca2cdcca..a145c41f04b16aada103f626030684c0464e02a4 100644 (file)
@@ -167,6 +167,12 @@ CREATE STATISTICS [ IF NOT EXISTS ] <replaceable class="parameter">statistics_na
    maintenance. Expression statistics are built automatically for each
    expression in the statistics object definition.
   </para>
+
+  <para>
+   Extended statistics are not currently used by the planner for selectivity
+   estimations made for table joins.  This limitation will likely be removed
+   in a future version of <productname>PostgreSQL</productname>.
+  </para>
  </refsect1>
 
  <refsect1 id="sql-createstatistics-examples">