Re: Slow queries on very big (and partitioned) table

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Job <Job(at)colliniconsulting(dot)it>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Slow queries on very big (and partitioned) table
Date: 2017-02-20 13:22:41
Message-ID: 20170220132241.GJ9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Job (Job(at)colliniconsulting(dot)it) wrote:
> we have a test machine with Postgresql 9.6.1 an about 800.000.000 record in a table.
> Table is partitioned by day, with indexes on partitioned table.

You probably shouldn't be partitioning by day for such a small dataset,
unless you've only got a few days worth of data that make up those 800m
records.

Having hundreds of partitions leads to slow query planning time. There
is work happening to improve on this by having declarative partitions
instead of using CHECK constraints and the constrain exclusion
mechanism.

Thanks!

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Job 2017-02-20 14:25:19 R: Slow queries on very big (and partitioned) table
Previous Message Jaime Soler 2017-02-20 12:38:52 Re: Slow queries on very big (and partitioned) table