Re: Stored procedure declared as VOLATILE => no good optimization is done

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <damon(at)huddler-inc(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: Stored procedure declared as VOLATILE => no good optimization is done
Date: 2010-10-15 19:24:39
Message-ID: 4CB864270200002500036A5F@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Damon Snyder wrote:

> I have heard it said that if a stored procedure is declared as
> VOLATILE, then no good optimizations can be done on queries within
> the stored procedure or queries that use the stored procedure (say
> as the column in a view). I have seen this in practice, recommended
> on the irc channel, and in the archives (
> http://archives.postgresql.org/pgsql-performance/2008-01/msg00283.php
> ). Can
> someone help me understand or point me to some documentation
> explaining why this is so?

Here's the documentation:

http://www.postgresql.org/docs/current/interactive/sql-createfunction.html

http://www.postgresql.org/docs/current/interactive/xfunc-volatility.html

-Kevin

Browse pgsql-performance by date

  From Date Subject
Next Message Nikolai Zhubr 2010-10-15 21:00:02 Re: Index scan / Index cond limitation or ?
Previous Message Tony Capobianco 2010-10-15 19:22:52 Re: oracle to psql migration - slow query in postgres