HI,
u mean the below parameter need to set on . its already on only.
alter system set constraint_exclusion to 'on';
Regards, Suganthi Sekar From: Justin Pryzby <pryzby@xxxxxxxxxxxxx>
Sent: 14 February 2019 15:35:33 To: suganthi Sekar Cc: pgsql-performance@xxxxxxxxxxxxxxxxxxxx Subject: Re: constraint exclusion with ineq condition (Re: server hardware tuning.) On Thu, Feb 14, 2019 at 09:38:52AM +0000, suganthi Sekar wrote:
> i am using Postgresql 11, i have 2 partition table , when i joined both table in query > a table its goes exact partition table , but other table scan all partition > > please clarify on this . > > Example : > > explain analyze > select * from call_report1 as a inner join call_report2 as b on a.call_id=b.call_id > where a.call_created_date ='2017-11-01' and '2017-11-30' Looks like this query waas manally editted and should say: > where a.call_created_date >='2017-11-01' AND a.call_created_date<'2017-11-30' Right? The issue is described well here: https://www.postgresql.org/message-id/flat/7DF51702-0F6A-4571-80BB-188AAEF260DA%40gmail.com https://www.postgresql.org/message-id/499.1496696552%40sss.pgh.pa.us You can work around it by specifying the same condition on b.call_created_date: > AND b.call_created_date >='2017-11-01' AND b.call_created_date<'2017-11-30' Justin |