Re: create index concurrently - duplicate index to reduce time without an index

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Gareth(dot)Williams <gareth(dot)williams(at)csiro(dot)au>, mabewlun <mabewlun(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: create index concurrently - duplicate index to reduce time without an index
Date: 2010-06-07 19:56:20
Message-ID: 1275940405-sup-9191@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Excerpts from Greg Smith's message of lun jun 07 12:23:44 -0400 2010:

> It is a periodic preventative maintenance operation you can expect to
> need occasionally, but certainly not often. Indexes maintain themselves
> just fine most of the time. They can get out of whack if you delete a
> lot of data out of them and there are some use patterns that tend to a
> aggravate the problems here (like tables where you're always inserting
> new data and deleting old), but it's certainly not something you run all
> the time.

Indexes on which you always insert new data and delete old can keep
themselves in good shape too. The really problematic cases are those in
which you delete new data and delete most, but not all, old data. Those
cases would result in almost empty pages that can never be recycled (we
do not have btree page merging).

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Wang, Mary Y 2010-06-07 21:10:33 Re: Does psql -f quit insertion after an error in a statement has been detected?
Previous Message Glen Barber 2010-06-07 18:47:31 Re: Misplaced pg_upgrade_support.so ?