Skip site navigation (1) Skip section navigation (2)

Re: Postgres insert performance and storage requirement compared to Oracle

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Leonardo Francalanci <m_lists(at)yahoo(dot)it>
Cc: Divakar Singh <dpsmails(at)yahoo(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres insert performance and storage requirement compared to Oracle
Date: 2010-10-26 15:41:59
Message-ID: AANLkTinaW3ZtGJbzgAARG0WfAOJxSPAbdVAZa6X_2dh+@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
On Tue, Oct 26, 2010 at 11:08 AM, Leonardo Francalanci <m_lists(at)yahoo(dot)it> wrote:
>> temp  tables are not wal logged or
>> synced.  Periodically they can be flushed  to a permanent table.
>
>
> What do you mean with "Periodically they can be flushed  to
> a permanent table"? Just doing
>
> insert into tabb select * from temptable
>

yup, that's exactly what I mean -- this will give you more uniform
insert performance (your temp table doesn't even need indexes).  Every
N records (say 10000) you send to permanent and truncate the temp
table.  Obviously, this is more fragile approach so weigh the
pros/cons carefully.

merlin

In response to

Responses

pgsql-performance by date

Next:From: Josh BerkusDate: 2010-10-26 20:54:07
Subject: Re: CPUs for new databases
Previous:From: Christian ElmerotDate: 2010-10-26 15:23:34
Subject: Re: CPUs for new databases

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2010-10-26 15:52:38
Subject: Re: xlog.c: WALInsertLock vs. WALWriteLock
Previous:From: Boszormenyi ZoltanDate: 2010-10-26 15:34:56
Subject: Re: plan time of MASSIVE partitioning ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group