Runtime partition pruning

From: Radu Radutiu <rradutiu(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Runtime partition pruning
Date: 2020-03-23 14:46:02
Message-ID: CAG4TxritPg9F3KsXtbtCHvDNBWZi5dwU4vLzVkHrr+CDGve-aQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello list,

Is runtime partition pruning available in PostgreSQL 12?

I have a table partitioned by range on column id (primary key).
For the query (client_id is passed as a parameter from the application):

select * from test where id between>0 and and id<1000 and client_id=? ;

partition pruning works fine.

However

select * from test where id between client_id-10 and client_id+10 and
client_id=?;

does not (it scans all partitions in parallel) .
Is it expected?

Regards,
Radu

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2020-03-23 15:16:40 Re: Loading 500m json files to database
Previous Message Christopher Browne 2020-03-23 14:12:08 Re: Loading 500m json files to database