doc: Make selectivity example match wording - Mailing list pgsql-hackers

From David G. Johnston
Subject doc: Make selectivity example match wording
Date
Msg-id CAKFQuwbD672Sc0EXv0ifx3pzfQ5UAEpiAeaBGKz_Ox-4d2NGCA@mail.gmail.com
Whole thread Raw
Responses Re: doc: Make selectivity example match wording
List pgsql-hackers
Hi,

Reposting this to its own thread.


    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.

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: doc: Fix description of how the default user name is chosen
Next
From: "David G. Johnston"
Date:
Subject: doc: Move enum storage commentary to top of section