Re: UNLOGGED TEMPORARY tables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: aasat <satriani(at)veranet(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UNLOGGED TEMPORARY tables?
Date: 2013-03-25 23:44:01
Message-ID: 23406.1364255041@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

aasat <satriani(at)veranet(dot)pl> writes:
> I was tested write speed to temporary and unlogged tables and noticed that
> unlogged tables was a much faster

> Postgres 9.2.2

> Write speed

> Temporary 14.5k/s
> UNLOGGED 50k/s

I think there's something skewed about your test.

Temp tables *are* unlogged. They also live in session-private buffers,
which eliminates a great deal of synchronization overhead; at the cost
that any writing that does happen has to be done by the backend process
itself, without help from the background writer. It's possible that
there's something about your specific test case that makes that scenario
look bad. Another likely source of bogus results is if you were testing
a tiny temp_buffers setting versus a more appropriately sized
shared_buffers setting.

However, this is all speculation, since you provided not a whit of
detail about your test case. Nobody's going to take these numbers
seriously if you haven't explained how to reproduce them.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2013-03-25 23:49:09 Re: UNLOGGED TEMPORARY tables?
Previous Message Guy Rouillier 2013-03-25 23:41:31 Re: help me to clear postgres problem