Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stephen Frost <sfrost@xxxxxxxxxxx> writes:
> * Job (Job@xxxxxxxxxxxxxxxxxxxx) wrote:
>> We thought to implement one partition for day.
>> Do you think it should be fine?

> Really depends on what you're doing.  If you're running very short
> queries that pull out just a record or a few records, then you're going
> to be unhappy with the planning time required when you have hundreds and
> thousands of partitions, which is why I typically recommend against
> using partitions-by-day unless you're only keeping a few months worth of
> data.

Or to put it more simply: if you have more than O(100) partitions,
you're doing it wrong.  There is a cost to subdividing things too finely.

The improved partitioning support that's going into v10 will probably
allow more partitions before it really starts to groan, but it'll still
not be a great idea to create more than the minimum number of partitions
you really need.

			regards, tom lane


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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux