Re: [Again] Postgres performance problem

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Mikko Partio <mpartio(at)gmail(dot)com>, "ruben(at)rentalia(dot)com" <ruben(at)rentalia(dot)com>, Decibel! <decibel(at)decibel(dot)org>, db(at)zigo(dot)dhs(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [Again] Postgres performance problem
Date: 2007-09-12 19:40:36
Message-ID: 20070912194036.GE2244@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Scott Marlowe escribió:

> > Aren't you mixing up REINDEX and CLUSTER?
>
> I don't think so. reindex (which runs on tables and indexes, so the
> name is a bit confusing, I admit) basically was originally a "repair"
> operation that rewrote the whole relation and wasn't completely
> transaction safe (way back, 7.2 days or so I think). Due to the
> issues with vacuum full bloating indexes, and being slowly replaced by
> regular vacuum, reindex received some attention to make it transaction
> / crash safe and has kind of take the place of vacuum full in terms of
> "how to fix bloated objects".

Hmm, REINDEX does not rewrite tables. If there are dead tuples, they
will still be there after REINDEX.

> cluster, otoh, rewrites the table into index order.

... excluding dead tuples, and then rewrites all the indexes.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dan Harris 2007-09-12 19:58:36 pg_dump blocking create database?
Previous Message Scott Marlowe 2007-09-12 19:27:14 Re: [Again] Postgres performance problem