RE: [INTERFACES] Speed of Postgres with Java

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Brad Pepers'" <brad(at)linuxcanada(dot)com>, ALPESH KOTHARI <alpeshkothari(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: RE: [INTERFACES] Speed of Postgres with Java
Date: 1999-12-07 07:11:04
Message-ID: 1B3D5E532D18D311861A00600865478C70BEF3@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Don't forget to commit() before closing the connection :-)

Peter

--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.

-----Original Message-----
From: Brad Pepers [mailto:brad(at)linuxcanada(dot)com]
Sent: Saturday, December 04, 1999 10:25 AM
To: ALPESH KOTHARI
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Speed of Postgres with Java

ALPESH KOTHARI wrote:
>
> Hello,
>
> I am using Postgres-6.5 as my database. I have to
> create and query db using Java (with JDBC). I am using
> P-III with 128 MB of RAM.
> Consider that following data structure is being stored
> in db.
> (int4,int4,varchar(50),int2,int4)
> To store such 1000 data it takes as large as 90
> seconds. I don't have any pre-experience using db.
> So, is this much time OK?
> I expect someone to comment who have used db with Java
> thoroughly.

You've turned off auto-commit right and just do one commit at
the end? Otherwise its doing a lot of work for each record
added. In general when you are doing bulk inserts, you want
to turn off some of the database features to gain speed.

Make sure auto-commit is off and then post the results. I
bet they are *way* faster!

--
Brad Pepers
Linux Canada Inc. Home of Linux products in Canada!
http://www.linuxcanada.com Proud supporter of Cyclades, Red
brad(at)linuxcanada(dot)com Hat, and Caldera.

************

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 1999-12-07 07:23:31 RE: [INTERFACES] Problems after creating jdbc driver postgresql.j ar 6.5.3
Previous Message Peter Mount 1999-12-07 07:04:22 RE: [INTERFACES] IBM JDK118 PostgreSQL StarOffice