pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ldh@laurent-hasson.com <ldh@laurent-hasson.com>
Cc: Marc Mamin <M.Mamin@intershop.de>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Inlining of functions (doing LIKE on an array)
Date: Sat, 12 Nov 2016 14:59:32 -0500
Message-ID: <2795.1478980772@sss.pgh.pa.us> (raw)
In-Reply-To: <35BE9BD1DD4DD444B0EDE3721E2AEA860115DECB@P3PWEX4MB001.ex4.secureserver.net>
References: <35BE9BD1DD4DD444B0EDE3721E2AEA860115CB08@P3PWEX4MB001.ex4.secureserver.net>
	<B6F6FD62F2624C4C9916AC0175D56D88421F197B@jenmbs01.ad.intershop.net>
	<35BE9BD1DD4DD444B0EDE3721E2AEA860115D550@P3PWEX4MB001.ex4.secureserver.net>
	<29682.1478882784@sss.pgh.pa.us>
	<35BE9BD1DD4DD444B0EDE3721E2AEA860115DECB@P3PWEX4MB001.ex4.secureserver.net>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

"ldh@laurent-hasson.com" <ldh@laurent-hasson.com> writes:
> I wish there were a way to force inlining, or some other mechanism as the performance difference is large here. I'll be using the inlining approach when possible, but the SQL Function approach is simpler and will likely be more suitable for some developers.

I'm not sure that there's any fundamental reason why we don't inline SQL
functions containing sub-selects.  It may just be not having wanted to put
any effort into the case way-back-when.  Inlining happens too late to
allow a resulting WHERE EXISTS to get mutated into a semijoin, but in this
example that couldn't happen anyway, so it's not much of an objection.

			regards, tom lane


-- 
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 (8+ messages)  latest in thread

Message-ID: <2795.1478980772@sss.pgh.pa.us>
Permalink:  ../2795.1478980772@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2795.1478980772@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ldh@laurent-hasson.com, M.Mamin@intershop.de
  Subject: Re: Inlining of functions (doing LIKE on an array)
  In-Reply-To: <2795.1478980772@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