From: Tom Lane <tgl@sss.pgh.pa.us>
To: hmidi slim <hmidi.slim2@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Does the delete+insert is fater and less cpu consumer than update?
Date: Thu, 14 Dec 2017 17:32:56 -0500
Message-ID: <25846.1513290776@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMsqVxtkRvvZ5UF0X3AXfr3gYA54keSk6T7AhZoHsguoMn_2rQ@mail.gmail.com>
References: <CAMsqVxtkRvvZ5UF0X3AXfr3gYA54keSk6T7AhZoHsguoMn_2rQ@mail.gmail.com>
hmidi slim <hmidi.slim2@gmail.com> writes:
> I used an update query to update the modified rows, however when I search
> on the net I found that some people said that update is cpu intensive
> consumer and delete+insert is faster.
It's possible that there are RDBMSes somewhere for which that is true.
But as far as Postgres is concerned, it's nonsense.
regards, tom lane
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: tgl@sss.pgh.pa.us, hmidi.slim2@gmail.com
Subject: Re: Does the delete+insert is fater and less cpu consumer than update?
In-Reply-To: <25846.1513290776@sss.pgh.pa.us>
References: <CAMsqVxtkRvvZ5UF0X3AXfr3gYA54keSk6T7AhZoHsguoMn_2rQ@mail.gmail.com> <25846.1513290776@sss.pgh.pa.us>
* 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