Re: Can this function be declared IMMUTABLE?
От | Jaime Casanova |
---|---|
Тема | Re: Can this function be declared IMMUTABLE? |
Дата | |
Msg-id | c2d9e70e0708292215n4a185bbbg5a83863703310e38@mail.gmail.com обсуждение исходный текст |
Ответ на | Can this function be declared IMMUTABLE? (beickhof@Lexmark.com) |
Список | pgsql-general |
On 8/27/07, beickhof@lexmark.com <beickhof@lexmark.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
В списке pgsql-general по дате отправления: