Re: Strange behaviour - performance decreases after each TRUNCATE - Mailing list pgsql-general

From Ивайло Гелов
Subject Re: Strange behaviour - performance decreases after each TRUNCATE
Date
Msg-id 1333022580.58680.1210780260155.JavaMail.apache@mail52.abv.bg
Whole thread Raw
List pgsql-general
 >
 >You don't need to re-index the indexes, you need to vacuum the tables.
 >
 >http://www.postgresql.org/docs/current/static/sql-vacuum.html
 >

My first idea was to throw away table BALANCE and work without it.
I even created a PL/SQL function for real-time calculation of article
balances.
But after some time of thinking I realized that this design will constantly
slow down, year after year - it will have to work with more and more records.
So I rewrote my script for data transfer, using INSERTs with multiple VALUES
and now running time suddenly shortened - it is now 496 seconds for about
837 000 records.
But it is still interesting for me why running time was increasing with each run (it may be still increasing even with
thenew script). 

-----------------------------------------------------------------
Всичко за Евро 2008 !!!
http://sportni.bg/euro2008/

pgsql-general by date:

Previous
From: Justin
Date:
Subject: Re: rounding problems
Next
From: Decibel!
Date:
Subject: Re: Best approach for large table maintenance