Tables grow in size when issuing UPDATEs! Why??

From: Daniel ?erud <zilch(at)home(dot)se>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Tables grow in size when issuing UPDATEs! Why??
Date: 2001-03-28 19:23:13
Message-ID: 985807393.141zilch@home.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I have noticed a strange thing when dealing with postgreSQL.

Foreword: this is all about postgres tables increasing in
size extremely fast when doing updates. My sainness is
decreasing in approximatly the same speed. Please look.

When I do this:

* create database foo
* create table test

CREATE TABLE test (
foo int4
);

and make, for example, 20 inserts into this. Arbitrary data.

Then, I make in another terminal: (user with permission)
cd /var/lib/postgres/data/base/foo

then,
watch -n 1 'ls -al test'

On my system it is now 8k big.

then (a couple of times),
update test set foo=5;

10 times is enough for it to get 16k big. I realised that it
increases in size EXTREMELY fast when only UDPATing. I find
this strange, as I update timestamp in my real database
often and in 5 minutes it is 2 megabytes big and containing
only 18 rows! (NO BULLSHIT!!)

Please help me with this I am quite desperate...

Daniel Åkerud

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Peterson 2001-03-28 19:30:10 Re: how to load a sql-file????
Previous Message Martin Jacobs 2001-03-28 19:16:54 Re: String REPLACE function