Stephen Frost <sfrost@snowman.net> writes:
> * Job (Job@colliniconsulting.it) 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