From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Jack Orenstein <jao@geophile.com>
To: pgsql-general@postgresql.org
Subject: Re: Very large table: Partition it or not?
Date: Thu, 17 Dec 2020 04:34:35 +0100
Message-ID: <c6aff1a1d73977f62f5d5b77cd60804c8b7d2b28.camel@cybertec.at> (raw)
In-Reply-To: <CAGNxcaveCA0wPux6gko2yX=e_N0Y0AUkbBGAjZOt6g7txgC3aQ@mail.gmail.com>
References: <CAGNxcaveCA0wPux6gko2yX=e_N0Y0AUkbBGAjZOt6g7txgC3aQ@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, jao@geophile.com
Subject: Re: Very large table: Partition it or not?
In-Reply-To: <c6aff1a1d73977f62f5d5b77cd60804c8b7d2b28.camel@cybertec.at>
References: <CAGNxcaveCA0wPux6gko2yX=e_N0Y0AUkbBGAjZOt6g7txgC3aQ@mail.gmail.com> <c6aff1a1d73977f62f5d5b77cd60804c8b7d2b28.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox