pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Stone <mstone+postgres@mathom.us>
To: pgsql-performance@postgresql.org
Subject: Re: insert vs select into performance
Date: Wed, 18 Jul 2007 07:31:43 -0400
Message-ID: <20070718113141.GH12481@mathom.us> (raw)
In-Reply-To: <469D2D59.9030106@ifi.uio.no>
References: <469D1AD3.9030004@ifi.uio.no>
	<0D6011B2-D09F-45E8-A5D7-5F84ADD1DC2B@seespotcode.net>
	<5666.1184704280@sss.pgh.pa.us>
	<469D2D59.9030106@ifi.uio.no>

On Tue, Jul 17, 2007 at 10:58:01PM +0200, Thomas Finneid wrote:
>I am not sure I understand you correctly here, are you saying that 
>SELECT INTO in 8.1 disables WAL logging and uses just a single fsync at 
>the end? in that case it means that I could disable WAL as well and 
>achieve the same performance, does it not?

Yes. The difference is that the select into optimization just means that 
if the system crashes the data you're inserting is invalid (and is 
properly cleaned up), and disabling the WAL means that if the system 
crashes everything is invalid (and can't be cleaned up). 

Mike Stone



view thread (22+ messages)  latest in thread

Message-ID: <20070718113141.GH12481@mathom.us>
Permalink:  ../20070718113141.GH12481@mathom.us/
Also on:    postgresql.org/message-id/20070718113141.GH12481@mathom.us

 · 

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: mstone+postgres@mathom.us
  Subject: Re: insert vs select into performance
  In-Reply-To: <20070718113141.GH12481@mathom.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