Re: Merging records in a table with 2-columns primary key - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Merging records in a table with 2-columns primary key
Date
Msg-id CA+bJJbycKKpuFUWBkD5th9Rq7LBragtEuB4KE0yAH6VZ8m2fkw@mail.gmail.com
Whole thread Raw
List pgsql-general
Alexander:

On Sun, Apr 2, 2017 at 5:27 PM, Alexander Farber
<alexander.farber@gmail.com> wrote:
> 2) Is there a way to use an UPDATE reviews instead of the inefficient
> (because copying) INSERT ... SELECT ... ON CONFLICT DO NOTHING?

mmm, I've just sent a sugestion to use delete+reinsert and would like
to point that in pg update~=delete+insert. I use those because many
times they are more efficient ( simple conditions on delete, insert is
fast in postgres, and you can vacuum in the middle if a large portion
is going to get reinserted to reuse the space )

Francisco Olarte.


pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Merging records in a table with 2-columns primary key
Next
From: Patrick B
Date:
Subject: effective_cache_size X shared_buffer