Re: constraint exclusion with ineq condition (Re: server hardwaretuning.)

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: constraint exclusion with ineq condition (Re: server hardwaretuning.)
Дата
Msg-id 20190216220406.GA26865@telsasoft.com
обсуждение исходный текст
Ответ на Re: constraint exclusion with ineq condition (Re: server hardware tuning.)  (Benedict Holland <benedict.m.holland@gmail.com>)
Список pgsql-performance
On Fri, Feb 15, 2019 at 12:24:18PM -0500, Benedict Holland wrote:
> That sounds like a perfect task for a view if the joins are all the same.

But note that either the view itself needs to have both where clauses (with
hardcoded dates?), or otherwise the view needs to be on only one table, and the
toplevel query needs to have where clause on each view, or else one of the
tables won't get constraint exclusion.

On Fri, Feb 15, 2019 at 9:36 AM suganthi Sekar <suganthi@uniphore.com> wrote:
> > 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.

> > From: Justin Pryzby <pryzby@telsasoft.com<mailto:pryzby@telsasoft.com>>
> > Sent: 14 February 2019 16:10:01
> > To: suganthi Sekar
> > Cc: pgsql-performance@lists.postgresql.org<mailto:
> > pgsql-performance@lists.postgresql.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'

-- 
Justin Pryzby
System Administrator
Telsasoft
+1-952-707-8581


В списке pgsql-performance по дате отправления:

Предыдущее
От: Mariel Cherkassky
Дата:
Сообщение: Re: ERROR: unrecognized parameter "autovacuum_analyze_scale_factor"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Performance regressions found using sqlfuzz