little question

Started by Vilson fariasover 25 years ago2 messagesgeneral
Jump to latest
#1Vilson farias
vilson.farias@digitro.com.br

Lets suppose I have a table with 1000 lines. I'd deleted 900 lines and after
this I'd done a vacuundb. The question is : The file that contains this
table will have its size reduced or I'll see no size changes?

Thanks

#2Neil Conway
neilc@samurai.com
In reply to: Vilson farias (#1)
Re: little question

On Thu, Dec 07, 2000 at 10:40:34AM -0200, Vilson farias wrote:

Lets suppose I have a table with 1000 lines. I'd deleted 900 lines and after
this I'd done a vacuundb. The question is : The file that contains this
table will have its size reduced or I'll see no size changes?

By lines, I assume you means rows.

The size will not be reduced, because Postgres will just mark
the deleted rows as 'deleted', and ignore them - they aren't
actually deleted on disk. To do this, run a 'VACUUM' on the
table.

HTH,

Neil

--
Neil Conway <neilconway@home.com>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

Whoever you are -- SGI, SCO, HP, or even Microsoft -- most of the
smart people on the planet work somewhere else.
-- Eric S. Raymond