Re: Postgres insert performance and storage requirement compared to Oracle - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: Postgres insert performance and storage requirement compared to Oracle
Date
Msg-id AANLkTi=-fK6ODDNJPntq3OeUJQzKtHbsmkdDM851waOG@mail.gmail.com
Whole thread Raw
In response to Re: Postgres insert performance and storage requirement compared to Oracle  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Postgres insert performance and storage requirement compared to Oracle  (Divakar Singh <dpsmails@yahoo.com>)
List pgsql-performance
On Tue, Oct 26, 2010 at 6:50 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Oct 26, 2010 at 5:54 PM, Mladen Gogala
> <mladen.gogala@vmsinfo.com> wrote:
>> The table is created with "on commit obliterate rows" option which means
>> that there is no need to do "truncate". The "truncate" command is a heavy
>> artillery. Truncating a temporary table is like shooting ducks in a duck
>> pond, with a howitzer.
>
> This is just not true.  ON COMMIT DELETE ROWS simply arranges for a
> TRUNCATE to happen immediately before each commit.  See
> PreCommit_on_commit_actions() in tablecmds.c.

quite so.  If you are doing anything performance sensitive with 'on
commit drop', you are better off organizing a cache around
txid_current() (now(), pid for older pg versions).  Skips the writes
to the system catalogs and truncate.

merlin

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Select count(*), the sequel
Next
From: "Ozer, Pam"
Date:
Subject: Slow Query- Bad Row Estimate