Hi, Reposting this to its own thread.
https://www.postgresql.org/message-id/flat/CAKFQuwby1aMsJDMeibaBaohgoaZhivAo4WcqHC1%3D9-GDZ3TSng%40mail.gmail.com doc: make unique non-null join selectivity example match the prose The description of the computation for the unique, non-null, join selectivity describes a division by the maximum of two values, while the example shows a multiplication by their reciprocal. While equivalent the max phrasing is easier to understand; which seems more important here than precisely adhering to the formula used in the code (for which either variant is still an approximation). While both num_distinct and num_rows are equal for a unique column both the concept and formula use row count (10,000) and the field num_distinct has already been set to mean the specific value present in the pg_stats table (i.e, -1), so use num_rows here. David J.
0001-doc-Make-selectivity-example-match-text.patch
Description: Binary data