Re: Huge query stalls at PARSE/BIND stage (1)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Huge query stalls at PARSE/BIND stage (1)
Дата
Msg-id 29674.1132252039@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Huge query stalls at PARSE/BIND stage (1)  (Matt <msubs@philips.org.uk>)
Список pgsql-bugs
Matt <msubs@philips.org.uk> writes:
> Yesterday I added 20 more join statements to the query (identical to
> existing statements) and now the main query which would run in <30
> seconds, runs indefinitely with the process stuck at "PARSE" in version
> 7.4, or "BIND" in version 8.0.3.

You *really* need to rethink your database design :-( ... thirty-way
JOINs are just not a very good idea.

Having said that, though, the fact that they're all outer joins should
save you from an exponential blowup in planning time, because there's
only one legal join order.  I'm not sure where the time is going.

If you'd be willing to send me a test case off-list, I'd be willing to
take a look.  A convenient test case from my point of view would be a
SQL script that sets up the database plus another one containing the
slow query.

            regards, tom lane

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

Предыдущее
От: "Mikael Carneholm"
Дата:
Сообщение: Re: Autovacuum deadlock - bug or not?
Следующее
От: "David Fetter"
Дата:
Сообщение: BUG #2051: CREATE TEMP TABLE AS SELECT doesn't play nice with ON COMMIT DROP