Re: Adding an additional join causes very different/slow query plan

Поиск
Список
Период
Сортировка
От Joe Van Dyk
Тема Re: Adding an additional join causes very different/slow query plan
Дата
Msg-id CACfv+pKNEmbQyJPCqRGsVmc_HvRGAi3d_Ge893N8qbX+ymhodA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Adding an additional join causes very different/slow query plan  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Adding an additional join causes very different/slow query plan  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-performance

On Mon, Dec 16, 2013 at 4:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Joe Van Dyk <joe@tanga.com> writes:
> Hm, setting set join_collapse_limit = 9 seemed to fix the problem. Is that
> my best/only option?

Yup, that's what I was just about to suggest.  You might want to use
10 or 12 in case some of your queries are a bit more complex than
this one --- but don't go overboard, or you may find yourself with
unreasonable planning time.

Is there a way to measure the planning time? It's not reported in 'explain analyze' or 'explain analyze verbose', right?

Joe

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Adding an additional join causes very different/slow query plan
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Adding an additional join causes very different/slow query plan