Re: a "huge" table with small rows and culumns

From: "Feng Xue" <feng(at)axe(dot)net(dot)au>
To: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: a "huge" table with small rows and culumns
Date: 2000-12-19 07:56:30
Message-ID: 011d01c06991$32dd4430$a401a8c0@javawoki
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi, brett and all,

after I use VACUUM command to clean up the database, the table size shrinked from 25M to 0.5M, which
is a BIG IMPROVEMENT!

I am now trying to find out why the size of this table is keeping growing while there are no add or
delete or change in the table (by using select * from table I can not find any changes), what other
people's suggestion may be right, this table is updating but I can not see it.

Thanks a lot for the advice.

Merry Christmas and Happy New Year.

feng

feng(at)axe(dot)net(dot)au
Axe Online Pty. Ltd.
T (02) 9437 0920
F (02) 9437 0261

----- Original Message -----
From: "Brett W. McCoy" <bmccoy(at)chapelperilous(dot)net>
To: "Feng Xue" <feng(at)axe(dot)net(dot)au>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, December 19, 2000 9:32 AM
Subject: Re: [GENERAL] a "huge" table with small rows and culumns

> On Tue, 19 Dec 2000, Feng Xue wrote:
>
> > In a particular table name "fred" there are only 50 rows and 13 columns. The column types are
int,
> > float, varchar, where
> > varchar's size is restricted to 50. But its size of
> > /usr/local/pgsql/data/base/The_Database_Name/fred is more than 20M, and it keeps growing while
the
> > rows number is still 50.
>
> You need to run VACCUM on the table to 'compress' it -- when data is
> deleted from a table, is is actually only marked as deleted and not used
> any more, with the new row being used instead. Running the vacuum will
> remove the data marked as deleted and shrink the table file size down. It
> will also improve performance.
>
> -- Brett
> http://www.chapelperilous.net/~bmccoy/
> ---------------------------------------------------------------------------
> ((lambda (foo) (bar foo)) (baz))
>
> > hi,
> >
> > I have been a postgres user for serveral months. But recently I find a
> "mysterious" things
> > in my /usr/local/pgsql/data/base/The_Database_Name/The_table_name.
> >
> > In a particular table name "fred" there are only 50 rows and 13 columns.
> The column types are int,
> > float, varchar, where
> > varchar's size is restricted to 50. But its size of
> > /usr/local/pgsql/data/base/The_Database_Name/fred is more than 20M, and
> it keeps growing while the
> > rows number is still 50.
> >
> > I am using linux (slackware), with postgres as database, Jonas as EJB
> server, Tomcat and apache
> > as webserver, the "fred" table is constantly looked up (no updated) by the
> user.
> >
> > Thanks in advance for any suggestions.
> >
> > Cheers
> >
> > Feng
>
>

>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trurl McByte 2000-12-19 10:33:11 Re: Simple mail() function for postgresql
Previous Message Gregory Wood 2000-12-19 03:22:03 Re: PL/pgSQL Trigger Problems