Re: Large number of partitions of a table

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

 



Hi Victor,

Thanks for starting a thread on a large number of partitions with PostgreSQL.

If you are okay, I would like to start with understanding the problem rather than the solution.
What I have understood so far is, you have a multi-tenant application and you are using PostgreSQL 13.5 as a data store for the same.

Few questions there:
Once we have above input, we can have a better data point oriented discussions around (a) partition pruning for select, updates and delete and plan time overhead (b) data clustering aspects (c) vacuum aspects of medium and large tables (d) depending upon scale of your operation, consider leveraging multi-schema and/or multiple databases to limit number of partitions per table provided your application can redirect a tenant to appropriate schema/databases.

Thanks,
Ketan




On Tue, Jan 18, 2022 at 5:49 PM Ron <ronljohnsonjr@xxxxxxxxx> wrote:
On 1/18/22 6:09 PM, Mladen Gogala wrote:
> On 1/18/22 09:47, Ron wrote:
>> EXPLAIN plans are going to be hilariously gigantic, which means that
>> query planning would take a loooong time,  And the query planner (in v12,
>> at least) can generate some pretty bad plans in partitioned tables; I bet
>> there are edge cases in the QP code that don't work well with 10000
>> partitions and 50000 indices.
>
> These things sometimes happen. On the oracle-l, there is a thread in
> progress about a generated SQL with 130,000 lines which fails parsing
> because parsing exhausts the available memory.
>

But there wasn't any programming.  The company saved so much money!!!

> In such cases, I am less inclined to look for a fault with the database
> software and more inclined to inflict an unusual and cruel punishment on
> whoever has designed the data model.
>

OOP was definitely involved, in some way or form...

--
Angular momentum makes the world go 'round.



[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux