Re: Join optimisation Quandry

Поиск
Список
Период
Сортировка
От Ceri Storey
Тема Re: Join optimisation Quandry
Дата
Msg-id 20040117104049.GC43530@mrtall.compsoc.man.ac.uk
обсуждение исходный текст
Ответ на Re: Join optimisation Quandry  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-performance
On Fri, Jan 16, 2004 at 10:05:54PM -0800, Stephan Szabo wrote:
> Well the plan would seems reasonable to me if there really was only 1 row
> coming from the where conditions on p1.  As a first step, if you raise the
> statistics target (see ALTER TABLE) for prog_start and prog_stop and
> re-analyze the table, do you get a better estimate of the rows from that
> condition?

Indeed, that helps a fair bit with the estimate.

> Secondly, what do you get if you enable_nestloop=off before
> explain analyzing the query?
See attachment.

Saying that, I've managed to halve the query time by lifting the join of
the title out of the RHS of the left outer join into the top-level of
the FROM clause; which was really the kind of advice I was after. If
this is the wrong list for that kind of thing, please say so.

Again, thanks.
--
Ceri Storey <cez@necrofish.org.uk>

Вложения

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

Предыдущее
От: Ceri Storey
Дата:
Сообщение: Re: Join optimisation Quandry
Следующее
От: Ceri Storey
Дата:
Сообщение: Re: Join optimisation Quandry