Skip site navigation (1) Skip section navigation (2)

Insert are going slower ...

From: Hervé Piedvache <herve(at)elma(dot)fr>
To: pgsql-performance(at)postgresql(dot)org
Subject: Insert are going slower ...
Date: 2004-07-13 16:50:52
Message-ID: 200407131850.52095.herve@elma.fr (view raw or flat)
Thread:
Lists: pgsql-performance
Hi,

I have a database with 10 tables having about 50 000 000 records ...
Every day I have to delete about 20 000 records, inserting about the same in 
one of this table.

Then I make some agregations inside the other tables to get some week results, 
and globals result by users. That mean about 180 000 to 300 000 insert by 
table each days.

The time for the calculation of the request is about 2 / 4 minutes ... I do 
the request inside a temporary table ... then I do an
insert into my_table select * from temp_table.

And that's the point, the INSERT take about (depending of the tables) 41 
minutes up to 2 hours ... only for 180 to 300 000 INSERTs ...

The table have index really usefull ... so please do not tell me to delete 
some of them ... and I can't drop them before inserting data ... it's really 
too long to regenerate them ...

I'm configured with no flush, I have 8 Gb of RAM, and RAID 5 with SCSI 7200 
harddrive ... I'm using Linux Debian, with a PostgreSQL version compiled by 
myself in 7.4.3.

What can I do to get better results ?? (configuration option, and/or hardware 
update ?)
What can I give you to get more important informations to help me ?

Regards,
-- 
Hervé Piedvache

Elma Ingénierie Informatique
6 rue du Faubourg Saint-Honoré
F-75008 - Paris - France
Pho. 33-144949901
Fax. 33-144949902

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2004-07-13 17:08:57
Subject: Re: [PERFORM] Cursors performance
Previous:From: Bill ChandlerDate: 2004-07-13 16:13:46
Subject: Re: [PERFORM] Cursors performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group