Re: Very large table: Partition it or not?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Jack Orenstein <jao(at)geophile(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Very large table: Partition it or not?
Date: 2020-12-17 03:34:35
Message-ID: c6aff1a1d73977f62f5d5b77cd60804c8b7d2b28.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2020-12-16 at 14:44 -0500, Jack Orenstein wrote:
> What are the pros and cons of partitioning the table?

Pro:

- it bebomes easier to get rid of old data

- autovacuum is more fun with several smaller tables

- a few select queries might become faster

Con:

- administrative overhead (creating and dropping partitions)

- most queries become slightly slower

> Without partitioning, are we liable to run into trouble as this table keeps growing?

That is hard to answer. If it works fine with 5*10^9 rows, it might also
work fine with more data.

The deciding factor might be getting rid of old data. That can be quite
painful with a single large table, but it might be trivial with partitioning.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gustavsson Mikael 2020-12-17 07:21:08 Problem with ssl and psql in Postgresql 13
Previous Message Tomas Vondra 2020-12-17 01:46:16 Re: Autovacuum not functioning for large tables but it is working for few other small tables.