pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ken Tanzer <ken.tanzer@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Immutable function WAY slower than Stable function?
Date: Mon, 06 Aug 2018 22:42:11 -0400
Message-ID: <27336.1533609731@sss.pgh.pa.us> (raw)
In-Reply-To: <CAD3a31X3u8A2aqnOHcQG-dE_vaeC=jm+O2uAw8+svp5B0MxC+w@mail.gmail.com>
References: <CAD3a31Vh6f5eLhK0kQL6b5mxr2Fc0qda1yW8YqTvDQRxcpg9jg@mail.gmail.com>
	<03120a03-75d0-ad6c-691c-35ca7e7fccfa@aklaver.com>
	<CAD3a31X3u8A2aqnOHcQG-dE_vaeC=jm+O2uAw8+svp5B0MxC+w@mail.gmail.com>

Ken Tanzer <ken.tanzer@gmail.com> writes:
> Hi Adrian.  Happy to provide this info.  Though on a side note, I don't
> understand why it should matter, if functions are black box optimization
> fences.

They aren't, at least not when they are SQL-language functions that
meet the conditions for inlining.  The reason that EXPLAIN VERBOSE
is helpful here is that you can see whether the function got inlined
or not: do you see a call to the function, or a representation of
its body?

			regards, tom lane




view thread (19+ messages)  latest in thread

Message-ID: <27336.1533609731@sss.pgh.pa.us>
Permalink:  ../27336.1533609731@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27336.1533609731@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ken.tanzer@gmail.com, adrian.klaver@aklaver.com
  Subject: Re: Immutable function WAY slower than Stable function?
  In-Reply-To: <27336.1533609731@sss.pgh.pa.us>
  References: <CAD3a31Vh6f5eLhK0kQL6b5mxr2Fc0qda1yW8YqTvDQRxcpg9jg@mail.gmail.com> <03120a03-75d0-ad6c-691c-35ca7e7fccfa@aklaver.com> <CAD3a31X3u8A2aqnOHcQG-dE_vaeC=jm+O2uAw8+svp5B0MxC+w@mail.gmail.com> <27336.1533609731@sss.pgh.pa.us>

* 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