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

From: Damon Snyder <damon(at)huddler-inc(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Stored procedure declared as VOLATILE => no good optimization is done
Date: 2010-10-11 23:10:08
Message-ID: AANLkTik6ynVXSZL9zbAcB12-+S1RfLoNQUGNANTNJjsH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello,
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?

Any insights would be appreciated. I'm new to pgsql and would like to know a
little more about what is going on under the hood.

Thanks,
Damon

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mladen Gogala 2010-10-11 23:50:36 Re: Slow count(*) again...
Previous Message Samuel Gendler 2010-10-11 22:03:38 Re: Slow count(*) again...