Re: proposal : cross-column stats - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: proposal : cross-column stats
Date
Msg-id 4D058036.3060309@fuzzy.cz
Whole thread Raw
In response to Re: proposal : cross-column stats  (Florian Pflug <fgp@phlo.org>)
Responses Re: proposal : cross-column stats  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> P(A|B) = P(A and B) / P(B).

Well, until this point we've discussed failure cases involving 'AND'
conditions. What about 'OR' conditions? I think the current optimizer
computes the selectivity as 's1+s2 - s1*s2' (at least that's what I
found in backend/optimizer/path/clausesel.c:630).

Sometimes that may return nearly 2x the actual selectivity, but in
general it's a reasonable estimate. Are there any severe failure cases
that produce much worse estimates?

regards
Tomas


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: proposal : cross-column stats
Next
From: Tomas Vondra
Date:
Subject: Re: proposal : cross-column stats