Re: batch inserts are "slow"

From: Steve Wampler
Subject: Re: batch inserts are "slow"
Date: ,
Msg-id: 4277C322.2010901@noao.edu
(view: Whole thread, Raw)
In response to: Re: batch inserts are "slow"  (Tim Terlegård)
List: pgsql-performance

Tree view

batch inserts are "slow"  (Tim Terlegård, )
 Re: batch inserts are "slow"  (Christopher Kings-Lynne, )
 Re: batch inserts are "slow"  (Christopher Petrilli, )
  Re: batch inserts are "slow"  (Tim Terlegård, )
   Re: batch inserts are "slow"  (Steve Wampler, )
   Re: batch inserts are "slow"  (Christopher Petrilli, )
 Re: batch inserts are "slow"  (Tim Terlegård, )
  Re: batch inserts are "slow"  (Christopher Petrilli, )
 Re: batch inserts are "slow"  (Tom Lane, )
 Re: batch inserts are "slow"  ("David Parker", )
  Re: batch inserts are "slow"  (Markus Schaber, )
   Re: batch inserts are "slow"  (Josh Berkus, )
    Re: batch inserts are "slow"  (Kris Jurka, )
     Re: batch inserts are "slow"  (Dave Cramer, )
   Testing list access  (Jona, )
 Re: batch inserts are "slow"  (Chris Browne, )

Tim Terlegård wrote:
>>
>>Just as on Oracle you would use SQL*Loader for this application, you
>>should use the COPY syntax for PostgreSQL.  You will find it a lot
>>faster.  I have used it by building the input files and executing
>>'psql' with a COPY command, and also by using it with a subprocess,
>>both are quite effective.
>
>
> I tried this now. Now it's down to 0.45 seconds. It feels a bit hacky to
> run /usr/bin/psql from java, but it sure works. Thanks for the hint!

There was a patch against 7.4 that provided direct JDBC access to
PostgreSQL's COPY.  (I have it installed here and *love* it - it
gives outstanding performance.)  However, it hasn't made into an
official release yet.  I don't know why, perhaps there's
a problem yet to be solved with it ('works for me', though)?

Is this still on the board?  I won't upgrade past 7.4 without it.

--
Steve Wampler -- 
The gods that smiled on your birth are now laughing out loud.


pgsql-performance by date:

From: Josh Berkus
Date:
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
From: John A Meinel
Date:
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?