Re: Slow SQL?

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Slow SQL?
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B5386C428@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Slow SQL?  (Bjørn T Johansen <btj@havleik.no>)
Список pgsql-general
Bjørn T Johansen wrote:
> Thx for your suggestions. Tried to use NOT EXISTS and the query was about half a second quicker so not
> much difference...
> But when I try to run the 3 queries separately, then they are very quick, 2 barely measurable and the
> third takes about 1,5 seconds. The union query
> takes a little over 9 seconds, so I guess the union part is the bottleneck?

Looking at EXPLAIN (ANALYZE) output should tell you.

If yes, is UNION ALL an option for you?
That should be cheaper.

Yours,
Laurenz Albe

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Slow SQL?
Следующее
От: Sameer Kumar
Дата:
Сообщение: Re: pg_restore out of memory