HOT updates in index-less tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: HOT updates in index-less tables
Date: 2010-11-13 15:51:48
Message-ID: 25819.1289663508@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

If a table has no indexes, we will always decide that any same-page
update operation is a HOT update, since obviously it isn't modifying
any indexed columns. But is there any benefit to doing so? I don't
see one offhand, and it has a downside: we're very likely to
encounter broken HOT chains if an index is created later. That leads
to the sort of unexpected behavior exhibited here:
http://archives.postgresql.org/pgsql-performance/2010-11/msg00216.php

I'm thinking maybe HeapSatisfiesHOTUpdate should be changed so that it
always returns false if the relation has no indexes, which could be
checked cheaply via relation->rd_rel->relhasindex.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2010-11-13 16:06:52 Re: [COMMITTERS] pgsql: Improved parallel make support
Previous Message Marko Tiikkaja 2010-11-13 15:42:25 Re: wCTE behaviour