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

Поиск
Список
Период
Сортировка
От Achilleas Mantzios
Тема 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
Дата
Msg-id 201101241740.40868.achill@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на 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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Στις Friday 21 January 2011 22:22:24 ο/η Tom Lane έγραψε:
> "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.

Isn't this probablity (an outer tuple has at least one unequal value in the inner relation)
= 1 - (probability that all values in the inner relation are equal to the value of the outer tuple)

Anyways, glad to see smth came out of this.
Thx

>
>             regards, tom lane
>



--
Achilleas Mantzios

В списке pgsql-performance по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: copy command and blobs
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Possible to improve query plan?