Re: HOT updates in index-less tables

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: HOT updates in index-less tables
Date: 2010-11-13 17:01:42
Message-ID: 1289667702.11116.236.camel@hvost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2010-11-13 at 10:51 -0500, Tom Lane wrote:
> 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?

If we do the in-page "mini vacuum" even without HOT, then there should
be no benefit from index-less HOT updates.

If we don't try the mini vacuum in this case, then some current
behaviuors could become much worse, say a table with one row and load of
updates.

> 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
>

--
-------
Hannu Krosing
PostgreSQL Infinite Scalability and Performance Consultant
PG Admin Book: http://www.2ndQuadrant.com/books/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-11-13 17:13:23 Re: HOT updates in index-less tables
Previous Message Dave Page 2010-11-13 16:33:20 Re: [COMMITTERS] pgsql: Improved parallel make support