Re: Calculation of unused columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Volker Grabsch <vog(at)notjusthosting(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Calculation of unused columns
Date: 2009-10-19 17:58:24
Message-ID: 8460.1255975104@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> On Mon, 2009-10-19 at 13:43 -0400, Tom Lane wrote:
>> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>>> I think we should have a 4th class of functions,
>>> volatile-without-side-effects (better name needed, obviously).
>>
>> What for? There wouldn't be that many, I think. random() and
>> clock_timestamp(), yeah, but most volatile user-defined functions
>> are either volatile-with-side-effects or misdeclared.

> Read only vs. read write?

Most read-only functions are stable or even immutable. I don't say
that there's zero usefulness in a fourth class, but I do say it's
unlikely to be worth the trouble. (The only reason it even came
up in this connection is that the default for user-defined functions
is "volatile" which would defeat this optimization ... but we could
hardly make the default anything else.)

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2009-10-19 18:05:27 Re: Calculation of unused columns
Previous Message Gerhard Wiesinger 2009-10-19 17:54:45 Re: Calculation of unused columns