Re: Strange behaviour - performance decreases after each TRUNCATE

From: Ивайло Гелов <ivo_gelov(at)abv(dot)bg>
To: Chris <dmagick(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange behaviour - performance decreases after each TRUNCATE
Date: 2008-05-14 15:51:00
Message-ID: 1333022580.58680.1210780260155.JavaMail.apache@mail52.abv.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 the new script).

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

Browse pgsql-general by date

  From Date Subject
Next Message Decibel! 2008-05-14 16:02:37 Re: Best approach for large table maintenance
Previous Message Justin 2008-05-14 15:47:52 Re: rounding problems