Re: simple question

From: "Rick Gigger" <rick(at)alpinenetworking(dot)com>
To: "Doug McNaught" <doug(at)mcnaught(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: simple question
Date: 2003-11-13 19:06:05
Message-ID: 005701c3aa19$31330f40$0700a8c0@trogdor
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > Is this correct?
> >
> > vacuum by itself just cleans out the old extraneous tuples so that they
> > aren't in the way anymore
>
> Actually it puts the free space in each page on a list (the free space
> map) so it can be reused for new tuples without having to allocate
> fresh pages. It finds free space by looking for tuples that can't be
> seen any more by any transaction.
>
> > vacuum analyze rebuilds indexes. If you add an index to a table it
won't be
> > used until you vacuum analyze it
>
> It doesn't rebuild indexes--REINDEX does that. ANALYZE measures the
> size and statistics of the data in the table, so the planner can do a
> good job.

Is REINDEX something that needs to be done on a periodic basis?

> > vacuum full actually compresses the table on disk by reclaiming the
space
> > from the old tuples after they have been removed.
>
> It moves tuples around and frees up pages at the end of the table,
> thus compacting it.
>
> So you're mostly wrong on all three. :)
>
> -Doug
>

Thanks!

Rick

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2003-11-13 19:11:13 Re: procpid in pg_stat_activity but no correspoding backend
Previous Message Jeff 2003-11-13 19:02:18 Re: DOMAIN usability