Re: optimizing constant quals within outer joins - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: optimizing constant quals within outer joins
Date
Msg-id 20060702004821.GH8098@surnet.cl
Whole thread Raw
In response to Re: optimizing constant quals within outer joins  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > I note that the rowcount is not altered by the one-time filter.  Is this
> > an issue?  I imagine the problem is not being able to estimate the
> > number of rows that pass the filter.
> 
> That's intentional.  The filter is either going to pass all or none of
> the rows, not some fraction of them.  It clearly isn't very reasonable
> to guess that it will pass none of them (except if the qual is actually
> constant FALSE).
> 
> > I also wonder whether it wouldn't be better in this case to apply each
> > filter to each arm of the merge join.
> 
> Uh, why?  For the most part, I'd think the higher you can put the filter
> in the plan tree, the better.

Huh, sorry, I had misunderstood the meaning of a _one_-time filter :-)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: optimizing constant quals within outer joins
Next
From: Tom Lane
Date:
Subject: note about syntax for fillfactor patch