Re: Using ctid column changes plan drastically

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using ctid column changes plan drastically
Дата
Msg-id 24101.1343149966@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using ctid column changes plan drastically  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Using ctid column changes plan drastically  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-performance
Thomas Kellerer <spam_eater@gmx.net> writes:
> Tom Lane wrote on 24.07.2012 17:55:
>> FWIW, it might be helpful to cast this as a NOT EXISTS rather than
>> NOT IN subquery.

> Hmm. How would you change that into an NOT EXISTS clause (so that one of the duplicates remains)
> Everything I come up with is in fact slower than the NOT IN solution.

Well, it would only help if you're running a PG version that's new
enough to recognize the NOT EXISTS as an anti-join; and even then,
it's possible that joining on a tid column forecloses enough plan
types that you don't get any real benefit.  But I'm just guessing.
Can you show exactly what you tried and what EXPLAIN ANALYZE results
you got?

            regards, tom lane

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Using ctid column changes plan drastically
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: transactions start time