Mistake in documentation for CREATE STATISTICS

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: theolassonder(at)hotmail(dot)com
Subject: Mistake in documentation for CREATE STATISTICS
Date: 2019-06-13 09:23:50
Message-ID: 156041783045.1348.6661129085836800862@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/sql-createstatistics.html
Description:

The example on https://www.postgresql.org/docs/11/sql-createstatistics.html
seems wrong: instead of "EXPLAIN ANALYZE SELECT ..." it should say "EXPLAIN
SELECT ...". If changed that way, the query optimizer estimates the number
of rows at 1 and then 100 after statistics are created which is indeed how
many the query returns. In the current wording, with ANALYZE, the query
optimizer estimates the number of rows at 100 for both the first and second
select.

Tested on PostgreSQL 11.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Pavel Luzanov 2019-06-13 12:14:13 ATTACH/DETACH partitions and locking
Previous Message Peter Eisentraut 2019-06-11 11:19:32 Add XSL stylesheet to fix up SVG files