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

From Tom Lane
Subject Re: proposal : cross-column stats
Date
Msg-id 7835.1292254490@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal : cross-column stats  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: proposal : cross-column stats  (Tomas Vondra <tv@fuzzy.cz>)
List pgsql-hackers
Tomas Vondra <tv@fuzzy.cz> writes:
> 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).

If you can solve the AND case, the OR case falls out of that.  Just
replace s1*s2 with a more accurate AND calculation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: hstores in pl/python
Next
From: "BRUSSER Michael"
Date:
Subject: Re: initdb failure with Postgres 8.4.4