Skip site navigation (1) Skip section navigation (2)

Re: deleting records from a table

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: deleting records from a table
Date: 2007-01-12 20:51:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Fri, Jan 12, 2007 at 09:45:28AM -0800, Mario Behring wrote:
> Simple question: once I execute the delete statement, does it free
> disk space immediatelly? Does Postgres uses something like a
> datafile with a pre-defined size like Oracle does??

What others said; but note that a vacuumed table that has a number of
now-empty slots can actually be a performance advantage, because new
rows don't need to increase the size of the table's on-disk file (so
you incur slightly less I/O).  There's a "sweet spot" for this that
you can discover by testing.


Andrew Sullivan  | ajs(at)crankycanuck(dot)ca
"The year's penultimate month" is not in truth a good way of saying
		--H.W. Fowler

In response to

pgsql-sql by date

Next:From: KenDate: 2007-01-14 06:33:07
Subject: update query taking 24+ hours
Previous:From: Scott MarloweDate: 2007-01-12 18:48:42
Subject: Re: deleting records from a table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group