Re: Estimates not taking null_frac element into account with @@ operator? (8.4 .. git-head) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Estimates not taking null_frac element into account with @@ operator? (8.4 .. git-head)
Date
Msg-id 8108.1297981248@sss.pgh.pa.us
Whole thread Raw
In response to Estimates not taking null_frac element into account with @@ operator? (8.4 .. git-head)  (Jesper Krogh <jesper@krogh.cc>)
Responses Re: Estimates not taking null_frac element into account with @@ operator? (8.4 .. git-head)  (Jesper Krogh <jesper@krogh.cc>)
List pgsql-hackers
Jesper Krogh <jesper@krogh.cc> writes:
> When something evaluates to "null" isn't included in the result, 
> shouldn't the query-planner
> then take the null_frac into account when computing the estimate?

The proposed patch seems wrong to me: if we're estimating on the basis
of most-common-value fractions, the null_frac is already accounted for,
because it's not part of the MCV selectivity fractions.  IOW, aren't you
double-counting the null fraction?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: SSI bug?
Next
From: Jesper Krogh
Date:
Subject: Re: Estimates not taking null_frac element into account with @@ operator? (8.4 .. git-head)