Re: [HACKERS] Constraint exclusion for partitioned tables

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Constraint exclusion for partitioned tables
Дата
Msg-id CA+TgmoZEE_-kpf-HpVP7_vhd7JPMJtZYxj6vphc7eoTcmJDAwA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Constraint exclusion for partitioned tables  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Ответы Re: [HACKERS] Constraint exclusion for partitioned tables  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
On Tue, Sep 12, 2017 at 7:08 AM, Jeevan Chalke
<jeevan.chalke@enterprisedb.com> wrote:
> This patch clearly improves the planning time with given conditions.
>
> To verify that, I have created a table like:
> create table foo(a int, b int check (b > 100), c text) partition by
> range(a);
> And then used following query to get planning time:
> select * from foo where b < 100;
>
> And on my local setup, I have observed that,
> For 16 partitions, planning time was 0.234692 ms, which reduced to 0.112948
> ms with this patch.
> For 128 partitions, planning time was 1.62305 ms, which reduced to 0.654252
> ms with this patch.
> For 1024 partitions, planning time was 18.720993 ms, which reduced to
> 9.667395 ms with this patch.
>
> This clearly shows an improvement in planning time.

What about the extra cost of checking the parent when it doesn't help?In that case we will have some loss.

I'm inclined to think that's OK, but it's something to think about.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256
Следующее
От: Chris Travers
Дата:
Сообщение: [HACKERS] pg_rewind proposed scope and interface changes