Re: Query with correlated join having slow performance

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Query with correlated join having slow performance
Дата
Msg-id CAHOFxGqm3PwX2M7k4BPNmX5pVii9tbA=uyLP+Xuhooc_+ZZ36A@mail.gmail.com
обсуждение исходный текст
Ответ на Query with correlated join having slow performance  (saket bansal <saket.tcs@gmail.com>)
Ответы Re: Query with correlated join having slow performance  (saket bansal <saket.tcs@gmail.com>)
Список pgsql-general
I'd suggest re-writing your query to avoid ORs whenever possible. Is this generated by an ORM or subject to change with filters selected in application or can you totally control it on DB side?

It may be hugely more performant to simply rewrite this as (almost) the same query twice UNION ALL'd together to separate the productalt1_.alt_pdt_dbky OR productalt1_.orgnl_pdt_dbky conditions.

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

Предыдущее
От: saket bansal
Дата:
Сообщение: Query with correlated join having slow performance
Следующее
От: Justin
Дата:
Сообщение: Re: Query with correlated join having slow performance