From: | "Jaime Casanova" <systemguards(at)gmail(dot)com> |
---|---|
To: | "beickhof(at)lexmark(dot)com" <beickhof(at)lexmark(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Can this function be declared IMMUTABLE? |
Date: | 2007-08-30 05:15:51 |
Message-ID: | c2d9e70e0708292215n4a185bbbg5a83863703310e38@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 8/27/07, beickhof(at)lexmark(dot)com <beickhof(at)lexmark(dot)com> wrote:
> Well, I am considering a function that does read from a table, but the
> table contents change extremely infrequently (the table is practically a
> list of constants). Would it be safe to declare the function IMMUTABLE
> provided that the table itself is endowed with a trigger that will drop
> and recreate the function any time the table contents are modified? In
> this way, it seems that the database would gain the performance benefit of
> an immutable function for the long stretches of time in between changes to
> the table.
>
make the function STABLE instead
> I apologize that I don't have any details -- it is still very early in the
> development of the database design, and I was just hoping to get a better
> understanding of whether an immutable function would safely offer any
> benefit in this scenario.
>
do you know that early optimization is the root of all evil?
--
regards,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Tolley | 2007-08-30 05:20:33 | Re: Can this function be declared IMMUTABLE? |
Previous Message | Scott Marlowe | 2007-08-30 04:59:04 | Re: What kind of locks does vacuum process hold on the db? |