Re: "NOT IN" substantially slower in 9.0.2 than 8.3.13 - NOT EXISTS runs fast in both 8.3.13 and 9.0.2 - Mailing list pgsql-performance

From Tom Lane
Subject Re: "NOT IN" substantially slower in 9.0.2 than 8.3.13 - NOT EXISTS runs fast in both 8.3.13 and 9.0.2
Date
Msg-id 19623.1295641344@sss.pgh.pa.us
Whole thread Raw
In response to Re: "NOT IN" substantially slower in 9.0.2 than 8.3.13 - NOT EXISTS runs fast in both 8.3.13 and 9.0.2  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: "NOT IN" substantially slower in 9.0.2 than 8.3.13 - NOT EXISTS runs fast in both 8.3.13 and 9.0.2
List pgsql-performance
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If it should be less than 1, then what?

> 1 - (estimated tuples / estimated distinct values) ?

Uh, no.  The number we're after is the probability that an outer tuple
has at least one unequal value in the inner relation.  This is not 1
minus the probability that a *specific* inner value is equal, which is
what I think your formula is estimating.

            regards, tom lane

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: Fun little performance IMPROVEMENT...
Next
From: grant@amadensor.com
Date:
Subject: Re: Fun little performance IMPROVEMENT...