Re: a "huge" table with small rows and culumns - Mailing list pgsql-general

From Feng Xue
Subject Re: a "huge" table with small rows and culumns
Date
Msg-id 011d01c06991$32dd4430$a401a8c0@javawoki
Whole thread Raw
In response to Re: a "huge" table with small rows and culumns  ("Brett W. McCoy" <bmccoy@chapelperilous.net>)
Responses Re: a "huge" table with small rows and culumns
List 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@axe.net.au
Axe Online Pty. Ltd.
T (02) 9437 0920
F (02) 9437 0261


----- Original Message -----
From: "Brett W. McCoy" <bmccoy@chapelperilous.net>
To: "Feng Xue" <feng@axe.net.au>
Cc: <pgsql-general@postgresql.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
>
>

>


pgsql-general by date:

Previous
From: Trurl McByte
Date:
Subject: Simple mail() function for postgresql
Next
From: "Brett W. McCoy"
Date:
Subject: Re: a "huge" table with small rows and culumns