pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Karl Czajkowski <karlcz@isi.edu>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: optimizing immutable vs. stable function calls?
Date: Mon, 23 Jan 2017 09:10:00 -0600
Message-ID: <74793a73-20ac-0e1f-bb61-cafe6b3371cf@BlueTreble.com> (raw)
In-Reply-To: <CAKFQuwb_VDka-DX44t=uyF+SGwbZtetC9q+7JiBkDa2WDj4h+g@mail.gmail.com>
References: <20170118223633.GC23081@moraine.isi.edu>
	<14964.1484780049@sss.pgh.pa.us>
	<CAKFQuwY-tztAzdaBNZR_uwiQnj1Ovbtd6-6uHQ57k8rXPrR+Nw@mail.gmail.com>
	<16158.1484781806@sss.pgh.pa.us>
	<CAKFQuwb_VDka-DX44t=uyF+SGwbZtetC9q+7JiBkDa2WDj4h+g@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 1/18/17 6:09 PM, David G. Johnston wrote:
> ​That would not be a productive exercise for me, or most people who just
> want
> some idea of what to expect in terms of behavior when they write and use a
> Stable function (Immutable and Volatile seem fairly easy to reason about).

Yeah, this isn't an uncommon question for users to have, and "read the 
code" isn't a great answer.

If there's a README or comment block that describes this, that might be 
a reasonable compromise.

It would certainly be useful to document how to push the planner in the 
right direction as well. I didn't realize that SELECT ... (SELECT 
slow_stable_function()) was a thing until reading this thread.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (10+ messages)  latest in thread

Message-ID: <74793a73-20ac-0e1f-bb61-cafe6b3371cf@BlueTreble.com>
Permalink:  ../74793a73-20ac-0e1f-bb61-cafe6b3371cf@BlueTreble.com/
Also on:    postgresql.org/message-id/74793a73-20ac-0e1f-bb61-cafe6b3371cf@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, david.g.johnston@gmail.com, tgl@sss.pgh.pa.us, karlcz@isi.edu
  Subject: Re: optimizing immutable vs. stable function calls?
  In-Reply-To: <74793a73-20ac-0e1f-bb61-cafe6b3371cf@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox