From: | Alex Burkoff <alex(dot)burkoff(at)jivesoftware(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: execution plan is wrong, or the query ? |
Date: | 2012-12-13 22:47:12 |
Message-ID: | E3E0FC08A807464C8DF38036F52A78FA035E5D1F@mbx4.jiveland.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Upgrade to 9.2.2 totally fixed the issue. Thanks again!
________________________________________
From: Tom Lane [tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Tuesday, December 11, 2012 9:10 AM
To: Alex Burkoff
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] execution plan is wrong, or the query ?
Alex Burkoff <alex(dot)burkoff(at)jivesoftware(dot)com> writes:
> I think I am just looking for an opinion on fundamentals. Can WHERE clause impact an OUTER JOIN ?
Sure. I noticed for instance that your query had some outer joins that
were simplified to plain joins as a result of strict WHERE clauses above
them. That's not incorrect.
> What I am seeing is that on 9.2 rows from the joined table are restricted prior to joining them with the rest
> of the tables, and that leads to incorrect results. I have noticed such behaviour only when CASE is used
> in the WHERE clause - straight text comparison does produce correct results.
Oh? Hm, I wonder whether you are needing this fix:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=72a4231f0c80f213a4fa75356dc3c6b7c7419059
Although that bug exists in some form back to 7.4, 9.2 had a more
obvious form of the disease, which is what led to its diagnosis.
If you're not running 9.2.2, give that a try and see if it's better.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2012-12-13 22:59:30 | Re: Read recover rows |
Previous Message | Alejandro Carrillo | 2012-12-13 22:23:18 | Read recover rows |