From: | salah jubeh <s_jubeh(at)yahoo(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Volodymyr Kostyrko <c(dot)kworr(at)gmail(dot)com>, pgsql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to push predicate down |
Date: | 2012-01-26 23:33:17 |
Message-ID: | 1327620797.18509.YahooMailNeo@web161504.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I think in my case, It is safe to push the predicate down. Can someone please, examine the behavior of other databases.If it behaves like postgres, I will assume there are some cases where it can lead to wrong result set. I tried SQL server but my windows refuses it :-)
Regards
________________________________
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: salah jubeh <s_jubeh(at)yahoo(dot)com>
Cc: Volodymyr Kostyrko <c(dot)kworr(at)gmail(dot)com>; pgsql <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, January 26, 2012 5:47 PM
Subject: Re: [GENERAL] How to push predicate down
salah jubeh <s_jubeh(at)yahoo(dot)com> writes:
> Sorry, The scenario, that I posted was not correct. I have traced it and the union was not the problem, As I said the query excusion plan is over 5000 line. I have created a scenario which similar to the scenario causes the problem I have.
> [ query uses EXCEPT not UNION ]
Hmm. The code explicitly won't push conditions down through an EXCEPT:
* 3. If the subquery contains EXCEPT or EXCEPT ALL set ops we cannot push
* quals into it, because that could change the results.
I remember coming to the conclusion that this is safe for
UNION/INTERSECT but not EXCEPT, but right at the moment I'm not sure why
I thought that --- it seems like a qual that suppresses specific rows
should suppress all matching copies.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Travers | 2012-01-26 23:36:15 | Re: Don't Thread On Me (PostgreSQL related) |
Previous Message | Chris Travers | 2012-01-26 23:32:26 | Re: Don't Thread On Me (PostgreSQL related) |