Re[2]: BUG #18166: 100 Gb 18000000 records table update

From: Ruslan Ganeev <ruslan(dot)ganeev(at)list(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re[2]: BUG #18166: 100 Gb 18000000 records table update
Date: 2023-10-21 10:34:23
Message-ID: 1697884463.759529479@f703.i.mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Thank you very much
--
Отправлено из Mail.ru для Android суббота, 21 октября 2023г., 04:22 +03:00 от Tom Lane tgl(at)sss(dot)pgh(dot)pa(dot)us :

>PG Bug reporting form < noreply(at)postgresql(dot)org> writes:
> We tried to make a script, which sets enddate = '2022-12-31' for all
> records, having the value in «DataVip» that is not maximal. For other
> records the script set s enddate = null
> The problem is that the script is running for 6 hours, the main percentage
> of time is taken by the rebuilding of indexes.
>
>This is not a bug. However ... a common workaround for bulk updates
>like that is to drop all the table's indexes and then recreate them
>afterwards. It's often quicker than doing row-by-row index updates.
>
>regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Boyer, Maxime (he/him | il/lui) 2023-10-21 15:38:41 RE: BUG #18165: Could not duplicate handle for "Global/PostgreSQL.xxxxxxxxxx": Bad file descriptor
Previous Message Alexander Lakhin 2023-10-21 06:30:00 Re: BUG #18165: Could not duplicate handle for "Global/PostgreSQL.xxxxxxxxxx": Bad file descriptor