Re: Join optimisation Quandry - Mailing list pgsql-performance

From Ceri Storey
Subject Re: Join optimisation Quandry
Date
Msg-id 20040117104049.GC43530@mrtall.compsoc.man.ac.uk
Whole thread Raw
In response to Re: Join optimisation Quandry  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List 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>

Attachment

pgsql-performance by date:

Previous
From: Ceri Storey
Date:
Subject: Re: Join optimisation Quandry
Next
From: Ceri Storey
Date:
Subject: Re: Join optimisation Quandry