performance for insert / update

From: Catalin Constantin <catalin(at)bounce-software(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: performance for insert / update
Date: 2005-06-27 15:46:58
Message-ID: 283340303.20050627184658@bounce-software.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have a pretty big database with about 200 000 rows.
This is the main table. Also some other tables with FKs to this main
table.

I have to calculate some numbers for each entry at a certain amount of
time and update the DB.

I've noticed the update TAKES a very long time.

For example i have a second table which has 3 columns:
1) the FK to the main big table
2) number 1
3) number 2

After the calculation is done i execute many update table2 set
number1=%d, number2=%d.

It takes quite a lot of time.

Any clue of how can i improve this time ?

I did some tests with other engines.

Eg: Mysql (no FKs) - aprox 10 times faster
SQLite - aprox 5 time faster

I tryed to set fsync = false but no luck either.
It still takes quite a lot of time.

I can share the complete test results if somebody is interested.

Thanks for your help !

p.s.: postgresql-7.4.7 is the version i have !

--
Catalin Constantin
Bounce Software
http://www.bounce-software.com
http://www.cabanova.ro

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-06-27 15:50:09 Re: Web application development on Win32, deployment on Linux
Previous Message Bruno Wolff III 2005-06-27 15:29:49 Re: Finding points within 50 miles