Re: Propogating conditions into a query

From: Kim Bisgaard <kib+pg(at)dmi(dot)dk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Propogating conditions into a query
Date: 2005-06-24 06:55:25
Message-ID: 42BBAE5D.40305@dmi.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

>Kim Bisgaard <kib+pg(at)dmi(dot)dk> writes:
>
>
>>The reason the first query is not performing is because the query
>>optimizer does not push the conditions down into the sub-queries - right??
>>
>>
>
>Well, it's not the same condition: the WHERE clause is constraining
>the output variable of the FULL JOIN, which is logically and
>implementationally distinct from either input table's variable.
>I suppose it is arguable that we could transform the WHERE clause into
>constraints on the input variables --- but we'd have to think carefully
>about the conditions under which such a transformation is valid.
>Offhand it seems like it might work for strict non-volatile constraint
>expressions that refer only to output variables of the JOIN; if they
>refer to other tables too then I'm not sure.
>
>
I am shure you know what you are talking about - I am just showing
another case where I think the above transformations are worthwhile
(pushing my problem :-) )

>This is by no means a "bug fix", but if I have time over the next week
>I'll see whether it is feasible to write for 8.1.
>
>
Hey thanks a lot - tell me if there is anything I can do (beer next time
in Copenhagen, work, ......)

Best regards,
Kim.
--
Computer Department Phone: +45 3915 7562 (direct)
Danish Meteorological Institute Fax: +45 3915 7460 (division)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank Rittinger 2005-06-24 06:57:21 problem calling psql from another program
Previous Message Joe 2005-06-24 05:45:02 Win32 users?