Re: constraint exclusion with ineq condition (Re: server hardware tuning.)

From: Benedict Holland <benedict(dot)m(dot)holland(at)gmail(dot)com>
To: suganthi Sekar <suganthi(at)uniphore(dot)com>
Cc: Michael Lewis <mlewis(at)entrata(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, "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-15 17:24:18
Message-ID: CAD+mzoydzS1UzmZyfGeSJJt2tgwi_b6NNnn8nB4oZCXb3VNFGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Sugathi,

That sounds like a perfect task for a view if the joins are all the same.

~Ben

On Fri, Feb 15, 2019 at 9:36 AM suganthi Sekar <suganthi(at)uniphore(dot)com>
wrote:

> Hi,
>
>
> yes i accept , but when i will do for existing tables, i am facing issue.
>
>
>
> I have created 100 Function , all the function having five table join(*now
> all partition by date*) , now its not possible to change where condition
> in all 100 Function.
>
> so that i am trying any other possibilities are there.
>
>
>
> Regards,
>
> Suganthi Sekar
> ------------------------------
> *From:* Michael Lewis <mlewis(at)entrata(dot)com>
> *Sent:* 15 February 2019 00:20:00
> *To:* suganthi Sekar
> *Cc:* Justin Pryzby; pgsql-performance(at)lists(dot)postgresql(dot)org
> *Subject:* Re: constraint exclusion with ineq condition (Re: server
> hardware tuning.)
>
> Yeah, the planner doesn't know that call_created_date can be limited on
> both tables unless you tell it specify it in the where condition as Laurenz
> said on another thread.
>
>
> *Michael Lewis*
>
> On Thu, Feb 14, 2019 at 7:35 AM suganthi Sekar <suganthi(at)uniphore(dot)com>
> wrote:
>
> Both table Portion by same column call_created_date
> ________________________________
> From: Michael Lewis <mlewis(at)entrata(dot)com>
> Sent: 14 February 2019 19:35:48
> To: suganthi Sekar
> Cc: Justin Pryzby; pgsql-performance(at)lists(dot)postgresql(dot)org
> Subject: Re: constraint exclusion with ineq condition (Re: server hardware
> tuning.)
>
> What are these two tables partitioned by?
>
> On Thu, Feb 14, 2019, 5:03 AM suganthi Sekar <suganthi(at)uniphore(dot)com
> <mailto:suganthi(at)uniphore(dot)com> wrote:
> Hi,
>
> Thanks, i know if explicitly we give in where condition it is working.
>
> i thought with below parameter in Postgresq11 this issue is fixed ?
>
> enable_partitionwise_join to 'on';
>
> what is the use of enable_partitionwise_join to 'on';
>
> Thanks for your response.
>
> Regards
> Suganthi Sekar
> ________________________________
> From: Justin Pryzby <pryzby(at)telsasoft(dot)com<mailto:pryzby(at)telsasoft(dot)com>>
> Sent: 14 February 2019 16:10:01
> To: suganthi Sekar
> Cc: pgsql-performance(at)lists(dot)postgresql(dot)org<mailto:
> 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 10:38:36AM +0000, suganthi Sekar wrote:
> > u mean the below parameter need to set on . its already on only.
> > alter system set constraint_exclusion to 'on';
>
> No, I said:
> > 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'
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mariel Cherkassky 2019-02-15 18:00:24 Re: ERROR: unrecognized parameter "autovacuum_analyze_scale_factor"
Previous Message Andres Freund 2019-02-15 16:44:34 Re: Performance regressions found using sqlfuzz