Re: REINDEX DATABASE

Поиск
Список
Период
Сортировка
От Achilleus Mantzios
Тема Re: REINDEX DATABASE
Дата
Msg-id Pine.LNX.4.44.0507280919020.4325-100000@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Re: REINDEX DATABASE  (Chris Browne <cbbrowne@acm.org>)
Ответы Re: REINDEX DATABASE  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
what is going on in the PostgreSQL  ("Eugene E." <sad@bankir.ru>)
Permission to Select  ("Eugene E." <sad@bankir.ru>)
Список pgsql-sql
O Chris Browne έγραψε στις Jul 27, 2005 :

> achill@matrix.gatewaynet.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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: REINDEX DATABASE
Следующее
От: "codeWarrior"
Дата:
Сообщение: Re: Convert numeric to money