From: | suganthi Sekar <suganthi(at)uniphore(dot)com> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: constraint exclusion with ineq condition (Re: server hardware tuning.) |
Date: | 2019-02-14 10:38:36 |
Message-ID: | SG2PR01MB2967106618165F57249C47F0BC670@SG2PR01MB2967.apcprd01.prod.exchangelabs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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(at)telsasoft(dot)com>
Sent: 14 February 2019 15:35:33
To: suganthi Sekar
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
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
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2019-02-14 10:40:01 | Re: constraint exclusion with ineq condition (Re: server hardware tuning.) |
Previous Message | Justin Pryzby | 2019-02-14 10:05:33 | Re: constraint exclusion with ineq condition (Re: server hardware tuning.) |