pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joachim Worringen <joachim.worringen@iathh.de>
To: pgsql-performance@postgresql.org
Subject: performance of temporary vs. regular tables
Date: Tue, 25 May 2010 09:59:56 +0200
Message-ID: <4BFB837C.6010005@iathh.de> (raw)

Greetings,

in 
http://archives.postgresql.org/message-id/1056648218.7041.11.camel@jester, 
it is stated that the performance of temporary tables is "the same as a 
regular table but without
WAL on the table contents.".

I have a datamining-type application which makes heavy use of temporary 
tables to stage (potentially large amounts of) data between different 
operations. WAL is write-ahead

To effectively multi-thread this application, I (think I) need to switch 
from temporary to regular tables, because
- the concurrent threads need to use different connections, not cursors, 
to effectively operate concurrently
- temporary tables are not visible across connections (as they are 
across cursors of the same connection)

Thus, I wonder how much this will affect performance. Access on the 
temporary table is inserting (millions of) rows once in a single 
transaction, potentially update them all once within a single 
transaction, then select on them once or more.

Of course, eventually loosing the data in these tables is not a problem 
at all. The threads are synchronized above the SQL level.

Thanks for any input on how to maximize performance for this applicaiton.

  Joachim




view thread (15+ messages)  latest in thread

Message-ID: <4BFB837C.6010005@iathh.de>
Permalink:  ../4BFB837C.6010005@iathh.de/
Also on:    postgresql.org/message-id/4BFB837C.6010005@iathh.de

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: joachim.worringen@iathh.de
  Subject: Re: performance of temporary vs. regular tables
  In-Reply-To: <4BFB837C.6010005@iathh.de>

* 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