Re: [PERFORM] temporary indexes

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [PERFORM] temporary indexes
Дата
Msg-id 44046913.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на Re: [PERFORM] temporary indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PERFORM] temporary indexes  (Lukas Smith <smith@pooteeweet.org>)
Список pgsql-hackers
>>> On Tue, Feb 28, 2006 at 11:05 am, in message
<16076.1141146348@sss.pgh.pa.us>,
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The limiting factor is that EXISTS subplans
> aren't flattened ... and once that's fixed, I doubt the example
would
> need any new kind of join support.

I rewrote the query to use IN predicates rather than EXISTS predicates,
and the cost estimates look like this:

EXISTS, no index:  1.6 billion
EXISTS, with index:  0.023 billion
IN, no index:  13.7 billion
IN, with index:  10.6 billion

At least for the two EXISTS cases, the estimates were roughly accurate.
 These plans were run against the data after the fix, but analyze has
not been run since then, so the estimates should be comparable with the
earlier post.

I'm not used to using the IN construct this way, so maybe someone can
spot something horribly stupid in how I tried to use it.

-Kevin


Вложения

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: [PERFORM] temporary indexes
Следующее
От: Tom Lane
Дата:
Сообщение: bug in PG_VERSION_NUM patch