Re: [SQL] Prolem wiht long query?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Prolem wiht long query?
Дата
Msg-id 25664.931965638@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Prolem wiht long query?  (Jérome Knöbl <jknobl@mandanet.ch>)
Список pgsql-sql
Jérome Knöbl <jknobl@mandanet.ch> writes:
> I have some trouble with a very long query.

The amount of time taken by the optimizer goes up exponentially with
the number of tables being joined.  If you are using a pre-6.5
version of Postgres then I'd recommend updating to 6.5; its optimizer
is considerably faster and less memory-hungry than prior releases.

You could also try reducing the GEQO threshold, which is the number
of tables at which the system stops trying to do exhaustive optimization
and changes to a heuristic planning method.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Few questions about my slow query
Следующее
От: Steven Bradley
Дата:
Сообщение: Re: [SQL] WHERE clause?