Re: [PERFORM] batch inserts are "slow"

2005-05-02 Thread Chris Browne
[EMAIL PROTECTED] (Christopher Petrilli) writes: > On 5/2/05, Tim Terlegård <[EMAIL PROTECTED]> wrote: >> Howdy! >> >> I'm converting an application to be using postgresql instead of >> oracle. There seems to be only one issue left, batch inserts in >> postgresql seem significant slower than in o

[PERFORM] Citation for "Bad n_distinct estimation; hacks suggested?"

2005-05-02 Thread Gurmeet Manku
Actually, the earliest paper that solves the distinct_n estimation problem in 1 pass is the following: "Estimating simple functions on the union of data streams" by Gibbons and Tirthapura, SPAA 2001. http://home.eng.iastate.edu/~snt/research/streaming.pdf The above paper addresses

Re: [PERFORM] batch inserts are "slow"

2005-05-02 Thread David Parker
We ran into the need to use COPY, but our application is also in Java. We wrote a JNI bridge to a C++ routine that uses the libpq library to do the COPY. The coding is a little bit weird, but not too complicated - the biggest pain in the neck is probably getting it into your build system. Here's t

Re: [PERFORM] batch inserts are "slow"

2005-05-02 Thread Christopher Petrilli
On 5/2/05, Tim Terlegård <[EMAIL PROTECTED]> wrote: > > > Howdy! > > > > > > I'm converting an application to be using postgresql instead of oracle. > > > There seems to be only one issue left, batch inserts in postgresql seem > > > significant slower than in oracle. I have about 200 batch jobs, ea

Re: [PERFORM] batch inserts are "slow"

2005-05-02 Thread Tom Lane
=?iso-8859-1?Q?Tim_Terleg=E5rd?= <[EMAIL PROTECTED]> writes: > There seems to be only one issue left, batch inserts in postgresql seem > significant slower than in oracle. I have about 200 batch jobs, each > consisting of about 14 000 inserts. > conn.setAutoCommit(false); > pst = conn.prepareState

Re: [PERFORM] batch inserts are "slow"

2005-05-02 Thread Tim Terlegård
> > Howdy! > > > > I'm converting an application to be using postgresql instead of oracle. > > There seems to be only one issue left, batch inserts in postgresql seem > > significant slower than in oracle. I have about 200 batch jobs, each > > consisting of about 14 000 inserts. Each job takes 1.3

Re: [PERFORM] batch inserts are "slow"

2005-05-02 Thread Christopher Petrilli
On 5/2/05, Tim Terlegård <[EMAIL PROTECTED]> wrote: > Howdy! > > I'm converting an application to be using postgresql instead of oracle. > There seems to be only one issue left, batch inserts in postgresql seem > significant slower than in oracle. I have about 200 batch jobs, each > consisting of

Re: [PERFORM] batch inserts are "slow"

2005-05-02 Thread Christopher Kings-Lynne
conn.setAutoCommit(false); pst = conn.prepareStatement("INSERT INTO tmp (...) VALUES (?,?)"); for (int i = 0; i < len; i++) { pst.setInt(0, 2); pst.setString(1, "xxx"); pst.addBatch(); } pst.executeBatch(); conn.commit(); This snip takes 1.3 secs in postgresql. How can I lower that? You're

[PERFORM] batch inserts are "slow"

2005-05-02 Thread Tim Terlegård
Howdy! I'm converting an application to be using postgresql instead of oracle. There seems to be only one issue left, batch inserts in postgresql seem significant slower than in oracle. I have about 200 batch jobs, each consisting of about 14 000 inserts. Each job takes 1.3 seconds in postgresql a