From: | Ceri Storey <cez(at)necrofish(dot)org(dot)uk> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | Ceri Storey <cez(at)necrofish(dot)org(dot)uk>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Join optimisation Quandry |
Date: | 2004-01-17 10:40:49 |
Message-ID: | 20040117104049.GC43530@mrtall.compsoc.man.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)necrofish(dot)org(dot)uk>
Attachment | Content-Type | Size |
---|---|---|
exp-out | text/plain | 2.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ceri Storey | 2004-01-17 11:58:26 | Re: Join optimisation Quandry |
Previous Message | Stephan Szabo | 2004-01-17 06:05:54 | Re: Join optimisation Quandry |