pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Stone <mstone+postgres@mathom.us>
To: Thomas Finneid <tfinneid@student.matnat.uio.no>
Cc: pgsql-performance@postgresql.org
Subject: Re: insert vs select into performance
Date: Tue, 17 Jul 2007 16:58:35 -0400
Message-ID: <20070717205832.GB12481@mathom.us> (raw)
In-Reply-To: <469D2B8E.7050208@ifi.uio.no>
References: <469D1AD3.9030004@ifi.uio.no>
	<0D6011B2-D09F-45E8-A5D7-5F84ADD1DC2B@seespotcode.net>
	<469D2B8E.7050208@ifi.uio.no>

On Tue, Jul 17, 2007 at 10:50:22PM +0200, Thomas Finneid wrote:
>I havent done this test in a stored function yet, nor have I tried it 
>with a C client so far, so there is the chance that it is java/jdbc that 
>makes the insert so slow. I'll get to that test soon if there is any 
>chance my theory makes sence.

What you're seeing is perfectly normal. Switch to COPY for fast inserts. 
(When you use inserts you need to wait for a round-trip for each row, 
instead of sending data to the server as fast as possible.)

Mike Stone



view thread (22+ messages)  latest in thread

Message-ID: <20070717205832.GB12481@mathom.us>
Permalink:  ../20070717205832.GB12481@mathom.us/
Also on:    postgresql.org/message-id/20070717205832.GB12481@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, tfinneid@student.matnat.uio.no
  Subject: Re: insert vs select into performance
  In-Reply-To: <20070717205832.GB12481@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