Re: Partitioning and constraint exclusion - Mailing list pgsql-general

From Jayadevan M
Subject Re: Partitioning and constraint exclusion
Date
Msg-id CAFS1N4g0ykYdYBVM0Fjw1uPBZy128bUco=GDmsSev2193uF62g@mail.gmail.com
Whole thread Raw
In response to Re: Partitioning and constraint exclusion  (Melvin Davidson <melvin6925@gmail.com>)
List pgsql-general


On Mon, Sep 7, 2015 at 7:12 PM, Melvin Davidson <melvin6925@gmail.com> wrote:
First, what is the PostgresSQL version ??????

9.3.6 

Next, in postgresql.conf, what is the value of constraint_exclusion ?

partition

In response to the other possible issues pointed out - the planner is indeed skipping the rest of the child tables (the ones with just a few values in the check constraint). That is why I feel the number of elements in the check constraint on this particular child table is causing it to be scanned. The query ends up scanning the table where the data will be found and the table with 2500+ values in the check constraint. I may be missing something?
I tried changing the filter from myuid in (1,2,3) to myuid = 1 or myuid = 2 or....
It did not improve the plan. One Index Cond became 3 Index Cond .


Thanks,
Jayadevan


pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: Re: Partitioning and constraint exclusion
Next
From: Craig Ringer
Date:
Subject: Re: BDR global sequences in two machine failover