Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id E037A9FB30D for ; Fri, 12 Jan 2007 16:52:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 01979-08 for ; Fri, 12 Jan 2007 16:52:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 0D9569FB28B for ; Fri, 12 Jan 2007 16:52:09 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1H5TWw-0006k5-BH for pgsql-sql@postgresql.org; Fri, 12 Jan 2007 16:01:42 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 976B841A2; Fri, 12 Jan 2007 15:51:59 -0500 (EST) Date: Fri, 12 Jan 2007 15:51:59 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: deleting records from a table Message-ID: <20070112205159.GA2806@phlogiston.dyndns.org> References: <4186.26875.qm@web30014.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4186.26875.qm@web30014.mail.mud.yahoo.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/42 X-Sequence-Number: 27194 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. A -- Andrew Sullivan | ajs@crankycanuck.ca "The year's penultimate month" is not in truth a good way of saying November. --H.W. Fowler