Re: [GENERAL] Index size

Поиск
Список
Период
Сортировка
Искать
От
Christophe Pettus
Тема
Re: [GENERAL] Index size
Дата
Msg-id
22BF390A-7248-4BE7-9930-FD51E8EF4CA8@thebuild.com
Ответ на
Re: [GENERAL] Index size (Melvin Davidson)
Список
Дерево обсуждения
Index size Samuel Williams <space.ship.traveller@gmail.com>
Re: Index size Adrian Klaver <adrian.klaver@aklaver.com>
Re: Index size Samuel Williams <space.ship.traveller@gmail.com>
Re: Index size Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: Index size Adrian Klaver <adrian.klaver@aklaver.com>
Re: Index size Samuel Williams <space.ship.traveller@gmail.com>
Re: Index size Steve Atkins <steve@blighty.com>
Re: Index size Melvin Davidson <melvin6925@gmail.com>
Re: Index size Samuel Williams <space.ship.traveller@gmail.com>
Re: Index size Melvin Davidson <melvin6925@gmail.com>
Re: Index size Andreas Joseph Krogh <andreas@visena.com>
Re: Index size Samuel Williams <space.ship.traveller@gmail.com>
Re: Index size Melvin Davidson <melvin6925@gmail.com>
Re: Index size Samuel Williams <space.ship.traveller@gmail.com>
Re: Index size "Joshua D. Drake" <jd@commandprompt.com>

> On Dec 11, 2016, at 08:37, Melvin Davidson  wrote:
> 
> Yes, I see your point, but the case where the row does not fit into the same block 
> would only occur with unlimited field types such as var[], bytea[], etc.

No, that's not correct either.  A block can fill up for any number of reasons: Dead tuples, a long HOT chain, or just a lot of data packed into the block.  The first UPDATE to a tuple in a block that was populated by continuous INSERTs or a COPY, if the table is using the default fillfactor, will cause the new tuple to be written to a different block, which will cause an index update.

The important thing to remember is that the process you are describing (in which indexes are not updated unless a column involved in the index changes) is an optimization, Heap-Only Tuples.  It's a very common optimization, but it's not guaranteed.

--
-- Christophe Pettus
   xof@thebuild.com


В списке pgsql-general по дате отправления
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] Index size
От: Julien Rouhaud
Дата:
FAQ