Re: problems with large table

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Mike Charnoky <noky(at)nextbus(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: problems with large table
Date: 2007-09-12 17:01:16
Message-ID: 20070912170116.GA30010@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joshua D. Drake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > At this point, I'm at a loss. I've searched the archives for similar
> > problems, but none of the suggestions have worked. Is the data in this
> > table corrupted? Why are both vacuum and reindex failing to complete?
> > Is there some sort of fine-tuning I should pay attention to? Any help
> > is much appreciated.
>
> At this point, you are in a world of hurt :). If you stop a vacuum you
> have created a huge mess of dead rows in that table. My suggestion is
> this to create a new table that is populated from the old table, rename
> the old table to big_table new, rename new table to old table. Run analyze.

Running CLUSTER is a faster and less error-prone way of doing the same thing.

--
Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"No single strategy is always right (Unless the boss says so)"
(Larry Wall)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Harrison 2007-09-12 17:05:31 Re: update problem in partitioned tables
Previous Message Erik Jones 2007-09-12 17:00:29 Re: Event-driven programming?