Re: [GENERAL] Slow queries on very big (and partitioned) table - Mailing list pgsql-general

From Stephen Frost
Subject Re: [GENERAL] Slow queries on very big (and partitioned) table
Date
Msg-id 20170220132241.GJ9812@tamriel.snowman.net
Whole thread Raw
In response to [GENERAL] Slow queries on very big (and partitioned) table  (Job <Job@colliniconsulting.it>)
Responses Re: [GENERAL] Slow queries on very big (and partitioned) table  (John R Pierce <pierce@hogranch.com>)
List pgsql-general
Greetings,

* Job (Job@colliniconsulting.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

Attachment

pgsql-general by date:

Previous
From: Jaime Soler
Date:
Subject: Re: [GENERAL] Slow queries on very big (and partitioned) table
Next
From: Job
Date:
Subject: R: [GENERAL] Slow queries on very big (and partitioned) table