performance for insert / update - Mailing list pgsql-general

From Catalin Constantin
Subject performance for insert / update
Date
Msg-id 283340303.20050627184658@bounce-software.com
Whole thread Raw
Responses Re: performance for insert / update
List 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


pgsql-general by date:

Previous
From: Jeff Gold
Date:
Subject: Re: Postmaster Out of Memory
Next
From: ben.hallert@gmail.com
Date:
Subject: Generate a list of (days/hours) between two dates