Re: Slow query (wrong index used maybe)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow query (wrong index used maybe)
Дата
Msg-id 2631.1390835184@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Slow query (wrong index used maybe)  (Stelian Iancu <stelian@iancu.ch>)
Ответы Re: Slow query (wrong index used maybe)  (Stelian Iancu <stelian@iancu.ch>)
Список pgsql-performance
Stelian Iancu <stelian@iancu.ch> writes:
> I have Postrgres 9.3 running on a Linux machine with 32GB RAM. I have a
> fairly large database (some tables with approx. 1 mil. records) and I
> have the following query:
> [ 13-way join joined to a 3-way join ]

Think you'll need to raise join_collapse_limit and from_collapse_limit
to get the best plan here.  The planning time might hurt, though.

TBH that schema looks designed for inefficiency; you'd be better off
rethinking the design rather than hoping the planner is smart enough
to save you from it.

            regards, tom lane


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

Предыдущее
От: Stelian Iancu
Дата:
Сообщение: Slow query (wrong index used maybe)
Следующее
От: salah jubeh
Дата:
Сообщение: Re: Slow query (wrong index used maybe)