Re: Speeding up operations - Mailing list pgsql-hackers

From Frank Wiles
Subject Re: Speeding up operations
Date
Msg-id 20030813144712.6b4cfeca.frank@wiles.org
Whole thread Raw
In response to Speeding up operations  ("Rahul_Iyer" <rahul_iyer@persistent.co.in>)
List pgsql-hackers
On Wed, 13 Aug 2003 10:53:39 +0530
"Rahul_Iyer" <rahul_iyer@persistent.co.in> wrote:

> hi...
> im on a project using Postgres. The project involves, at times, upto
> 5,000,000 inserts. I was checking the performance of Postgres for 5M
> inserts into a 2 column table (one col=integer, 2nd col=character). I
> used the Prepare... and execute method, so i basically had 5M execute
> statements and 1 prepare statement. Postgres took 144min for this...
> is there any way to improve this performance? if so, how? btw, im
> using it on a SPARC/Solaris 2.6.
> thanx in adv
> rahul
> 
> P.S: Kindly point me towards any relevant documentation as well.
 If this is a one time insert you'll want to remove any indexes and rebuild them after the inserts are done.  
 Also you'll want to look into the COPY command here: 
 http://www.postgresql.org/docs/7.3/static/sql-copy.html
 Loading the data from file like this is probably going to be much faster than from a script and/or program. 
---------------------------------  Frank Wiles <frank@wiles.org>
http://frank.wiles.org---------------------------------



pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Speeding up operations
Next
From: Tom Lane
Date:
Subject: Re: Speeding up operations