Re: Index Bloat - how to tell?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Index Bloat - how to tell?
Дата
Msg-id AANLkTikedY0=mBZ4nFm3XQK=u08j59yqPMsrsJqA=fgP@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Index Bloat - how to tell?  (Mladen Gogala <mladen.gogala@vmsinfo.com>)
Ответы Re: Index Bloat - how to tell?
Список pgsql-performance
On Thu, Dec 16, 2010 at 2:27 PM, Mladen Gogala
<mladen.gogala@vmsinfo.com> wrote:
> What is "leaf_fragmentation"? How is it defined? I wasn't able to find out
> any definition of that number. How is it calculated. I verified that running
> reindex makes it 0:

Well, according to the code:

                        /*
                         * If the next leaf is on an earlier block, it means a
                         * fragmentation.
                         */
                        if (opaque->btpo_next != P_NONE &&
opaque->btpo_next < blkno)
                                indexStat.fragments++;

And then the final value is calculated thus:

                snprintf(values[j++], 32, "%.2f", (double)
indexStat.fragments / (double) indexStat.leaf_pages * 100.0);

This doesn't really match my definition of the word "fragmentation", though...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Compared MS SQL 2000 to Postgresql 9.0 on Windows
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Strange optimization - xmin,xmax compression :)