Re: Thoughts on how to avoid a massive integer update.

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Thoughts on how to avoid a massive integer update.
Дата
Msg-id 20200505193311.GA10626@hjp.at
обсуждение исходный текст
Ответ на Thoughts on how to avoid a massive integer update.  ("Fehrle, Brian" <bfehrle@comscore.com>)
Список pgsql-general
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!"

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Lock Postgres account after X number of failed logins?
Следующее
От: Miles Elam
Дата:
Сообщение: RETURNING to_jsonb(...)