Re: Slow Query and Big File Size even after emptying

From: Mark Roberts <mailing_lists(at)pandapocket(dot)com>
To: "Ridvan Lakas ng Bayan S(dot) Baluyos" <ridvan(at)baluyos(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Slow Query and Big File Size even after emptying
Date: 2008-07-01 04:00:16
Message-ID: 1214884816.6049.98.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Tue, 2008-07-01 at 11:02 +0800, Ridvan Lakas ng Bayan S. Baluyos
wrote:
> Hi All,
>
> I checked the file size of my database and it's 115GB. I already
> figured out which tables suck up all the space and I decided to delete
> all the entries in them. But still after emptying (DELETE FROM
> <tablename>), the file size still hasn't changed. I already tried to
> VACUUM the table. Also, even if there are already 0 records within the
> table that I emptied, when I query to that table it's so slow and then
> it just gives a 0 results.
>
> Is there anything that I missed out here? Like do I need to do some
> other cleanups within postgres(eg. cache, etc)?
>
>
> TIA for your replies. It would be very much appreciated.
>
>
> Ridvan

You might consider using truncate, if you're serious about removing
those rows. Otherwise, you could consider a vacuum full, and don't
forget to analyze afterwards.

-Mark

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Lewis Cunningham 2008-07-01 18:27:22 Re: Automatic SQL command execution
Previous Message Ridvan Lakas ng Bayan S. Baluyos 2008-07-01 03:02:01 Slow Query and Big File Size even after emptying