From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Re: Thoughts on how to avoid a massive integer update.
Date: Tue, 5 May 2020 21:33:11 +0200
Message-ID: <20200505193311.GA10626@hjp.at> (raw)
In-Reply-To: <C7D3EE42-66B9-44AF-83F4-CB7F0F42486E@comscore.com>
References: <C7D3EE42-66B9-44AF-83F4-CB7F0F42486E@comscore.com>
On 2020-05-04 21:32:56 +0000, Fehrle, Brian wrote:
> I have a database with hundreds of terabytes of data, where every table has an
> integer column referencing a small table. For reasons out of my control and
> cannot change, I NEED to update every single row in all these tables, changing
> the integer value to a different integer.
>
>
>
> Since I have to deal with dead space, I can only do a couple tables at a time,
> then do a vacuum full after each one.
Do you have to change all the values at the same time? If you can change
them one (or a few) at a time, the tables shouldn't bloat much.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: hjp-pgsql@hjp.at
Subject: Re: Thoughts on how to avoid a massive integer update.
In-Reply-To: <20200505193311.GA10626@hjp.at>
References: <C7D3EE42-66B9-44AF-83F4-CB7F0F42486E@comscore.com> <20200505193311.GA10626@hjp.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