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

From Brett W. McCoy
Subject Re: a "huge" table with small rows and culumns
Date
Msg-id Pine.LNX.4.30.0012181730290.9979-100000@chapelperilous.net
Whole thread Raw
In response to a "huge" table with small rows and culumns  ("Feng Xue" <feng@axe.net.au>)
List pgsql-general
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))


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Are arrays broken in 7.0.3?
Next
From: "Feng Xue"
Date:
Subject: Re: a "huge" table with small rows and culumns