Re: [Sender Address Forgery]Re: path toward faster partition pruning

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Beena Emerson <memissemerson(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Sender Address Forgery]Re: path toward faster partition pruning
Date: 2017-11-06 09:59:46
Message-ID: 351de04c-d29e-c8d1-4bcf-47278f958414@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017/11/06 13:15, David Rowley wrote:
> On 31 October 2017 at 21:43, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> Attached updated version of the patches
>
> match_clauses_to_partkey() needs to allow for the way quals on Bool
> columns are represented.
>
> create table pt (a bool not null) partition by list (a);
> create table pt_true partition of pt for values in('t');
> create table pt_false partition of pt for values in('f');
> explain select * from pt where a = true;
> QUERY PLAN
> ------------------------------------------------------------------
> Append (cost=0.00..76.20 rows=2810 width=1)
> -> Seq Scan on pt_false (cost=0.00..38.10 rows=1405 width=1)
> Filter: a
> -> Seq Scan on pt_true (cost=0.00..38.10 rows=1405 width=1)
> Filter: a
> (5 rows)
>
> match_clause_to_indexcol() shows an example of how to handle this.
>
> explain select * from pt where a = false;
>
> will need to be allowed too. This works slightly differently.

You're right. I've fixed things to handle Boolean partitioning in the
updated set of patches I will post shortly.

Thanks,
Amit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2017-11-06 10:01:42 Re: path toward faster partition pruning
Previous Message Masahiko Sawada 2017-11-06 09:42:41 Re: Moving relation extension locks out of heavyweight lock manager