Re: [GENERAL] PostgreSQL Performance issue

2010-04-29 Thread DM
Hello there, 1. Try using COPY Command, you will see significant decrease in the loading time. 2. Turn off auto commit and Remove foreign key constraints if it is only one time load - this will also help in decreasing the load time. Try these options and let us know how it went. We load around

[GENERAL] PostgreSQL Performance issue

2010-04-27 Thread A.Bhattacharya
Dear All Experts, I am using in PostgreSQL 8.3.5 database on windows 64 bit OS. However, I have a batch program written in Java which processes the data and populates them into tables in Postgres database. I have 622,000 number of records but it is taking almost 4 and half hours to load

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Thom Brown
On 27 April 2010 09:11, a.bhattacha...@sungard.com wrote: Dear All Experts, I am using in PostgreSQL 8.3.5 database on windows 64 bit OS. However, I have a batch program written in Java which processes the data and populates them into tables in Postgres database. I have *622,000

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Nikhil G. Daddikar
Most likely you are inserting one per transaction. Set autocommit to false and commit only after all the inserts are done. -n. On 27-04-2010 13:41, a.bhattacha...@sungard.com wrote: Dear All Experts, I am using in PostgreSQL 8.3.5 database on windows 64 bit OS. However, I have a batch

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Magnus Hagander
On Tue, Apr 27, 2010 at 10:11, a.bhattacha...@sungard.com wrote: Dear All Experts, I am using in PostgreSQL 8.3.5 database on windows 64 bit OS. You really need to upgrade. At least to 8.3.10. It has many important bugfixes. However, I have a batch program written in Java which

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread John R Pierce
a.bhattacha...@sungard.com wrote: Dear All Experts, I am using in PostgreSQL 8.3.5 database on windows 64 bit OS. However, I have a batch program written in Java which processes the data and populates them into tables in Postgres database. I have *622,000 number of records *but it is

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Alban Hertroys
On 27 Apr 2010, at 10:11, a.bhattacha...@sungard.com a.bhattacha...@sungard.com wrote: Dear All Experts, I am using in PostgreSQL 8.3.5 database on windows 64 bit OS. However, I have a batch program written in Java which processes the data and populates them into tables in Postgres

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread A.Bhattacharya
. From: Magnus Hagander [mailto:mag...@hagander.net] Sent: Tuesday, April 27, 2010 2:19 PM To: Bhattacharya, A Cc: pgsql-general Subject: Re: [GENERAL] PostgreSQL Performance issue On Tue, Apr 27, 2010 at 10:11, a.bhattacha...@sungard.com wrote: Dear All Experts, I am

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Rob Richardson
I am curious to know how much of your delay is due to PostgreSQL and how much to your Java batch program. If you comment out the call to the database function, so that you are reading your input file but not doing anything with the data, how long does your batch program take to run? RobR

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Alban Hertroys
On 27 Apr 2010, at 11:15, a.bhattacha...@sungard.com a.bhattacha...@sungard.com wrote: Thanks a lot for your help. However I am new to Postgres database therefore it would be nice if you can let me know how to set autocommit off. I know from psql client issuing “\set Autocommit Off” would

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Merlin Moncure
On Tue, Apr 27, 2010 at 5:17 AM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: On 27 Apr 2010, at 10:11, a.bhattacha...@sungard.com a.bhattacha...@sungard.com wrote: Dear All Experts, I am using in PostgreSQL 8.3.5 database on windows 64 bit OS. However, I have a batch program

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Bayless Kirtley
Thanks a lot for your help. However I am new to Postgres database therefore it would be nice if you can let me know how to set autocommit off. I know from psql client issuing “\set Autocommit Off” would set it off but unfortunately it doesn’t set it off. It's a client-side setting, not a

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Greg Smith
a.bhattacha...@sungard.com wrote: I have *622,000 number of records *but it is taking almost *4 and half hours* to load these data into the tables. I have a simple function in db which is being called from Java batch program to populate the records into tables from flat files. Four likely

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Vincenzo Romano
2010/4/27 Greg Smith g...@2ndquadrant.com: a.bhattacha...@sungard.com wrote: I have *622,000 number of records *but it is taking almost *4 and half hours* to load these data into the tables. Without the schema and the queries, all you can get is guessing. -- Vincenzo Romano NotOrAnd

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread A.Bhattacharya
I am curious to know how much of your delay is due to PostgreSQL and how much to your Java batch program. If you comment out the call to the database function, so that you are reading your input file but not doing anything with the data, how long does your batch program take to run? RobR