Re: HOT patch, missing things

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Pavan Deolasee" <pavan(at)enterprisedb(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOT patch, missing things
Date: 2007-08-09 12:25:14
Message-ID: 87sl6sevyt.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:

> HOT update is feasible iff
>
> - old and new tuples, both match the partiality condition OR
> - old and new tuples, both don't match the condition
...
> For functional index, we should apply the function to the old and new
> tuple and compare the outcome. If the results are same, HOT update
> is feasible.

This is debatable. We could compare the columns used in the partial condition
expression or function expression directly. If they're the same then the
expression or function must return the same value. If the function is quite
expensive then that might be cheaper.

On the other hand if it's not expensive and the columns change frequently but
the results don't then we might be doing a lot of work for nothing.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans-Juergen Schoenig 2007-08-09 13:39:06 crypting prosrc in pg_proc
Previous Message Merlin Moncure 2007-08-09 12:09:50 Re: comunication protocol