Re: [Again] Postgres performance problem - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: [Again] Postgres performance problem
Date
Msg-id 20070912194036.GE2244@alvh.no-ip.org
Whole thread Raw
In response to Re: [Again] Postgres performance problem  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List 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.

pgsql-performance by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: [Again] Postgres performance problem
Next
From: Dan Harris
Date:
Subject: pg_dump blocking create database?