Search Postgresql Archives

Re: Index size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Dec 11, 2016, at 08:37, Melvin Davidson <melvin6925@xxxxxxxxx> 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@xxxxxxxxxxxx



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux