From: | Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> |
---|---|
To: | Chris Browne <cbbrowne(at)acm(dot)org> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: REINDEX DATABASE |
Date: | 2005-07-28 06:32:46 |
Message-ID: | Pine.LNX.4.44.0507280919020.4325-100000@matrix.gatewaynet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
O Chris Browne έγραψε στις Jul 27, 2005 :
> achill(at)matrix(dot)gatewaynet(dot)com (Achilleus Mantzios) writes:
> > O Chris Browne έγραψε στις Jul 26, 2005 :
> >> You can get a savings of about 4% of the space, but at the cost of
> >> taking an appreciable outage during which the database is not usable.
> >
> > 1st not all database is unusable, during the whole reindexdb run,
> > 2nd outage outside office hours is acceptable for those who apply.
>
> I'm not willing to assume that.
>
> I help support some applications where "outages outside office hours"
> are acceptable; I help support some other applications for which
> "office hours" are 24 hours per day, 7 days per week, and such an
> outage would be deemed decidedly unacceptable.
>
> >> I wouldn't expect the 4% savings in space to lead to a particularly
> >> measurable improvement in performance, certainly not one worth the
> >> outage.
>
> > I am just saying that the common saying "reindex is not needed for
> > 7.4+" maybe is not true in all circumstances.
>
> Let me quote the release notes for 7.4.1:
>
> "Make free space map efficiently reuse empty index pages, and other
> free space management improvements
>
> In previous releases, B-tree index pages that were left empty
> because of deleted rows could only be reused by rows with index
> values similar to the rows originally indexed on that page. In
> 7.4, VACUUM records empty index pages and allows them to be reused
> for any future index rows."
>
> <http://www.postgresql.at/pg/pgsql/doc/html/release-7-4.html>
>
> In versions earlier than 7.4, running a REINDEX periodically was
> *essential* if you had update patterns consistent with the (remarkably
> common) scenario described above.
>
> This reason to reindex (which was the main reason we required
> reindexing when using 7.2) has been resolved and gone away in 7.4.
>
> There may be other factors that could mandate REINDEX; as far as I can
> tell, the main such factor that remains would be where a table sees
> enormous numbers of updates but is not VACUUMed often enough.
I'll try to postpone the next reindexdb at the end of august,
and get some numbers then.
However the big difference in performance as i told was near the 2GB
"threshold", and at *that* point (and maybe for different reasons)
performance gain was remarkable.
>
> _That_ scenario isn't consistent with what you describe, as it would
> be expected to involve a whole lot more than 4% growth in the size of
> the database.
>
--
-Achilleus
From | Date | Subject | |
---|---|---|---|
Next Message | codeWarrior | 2005-07-28 15:41:43 | Re: Convert numeric to money |
Previous Message | Tom Lane | 2005-07-28 05:08:55 | Re: REINDEX DATABASE |