Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V9SCv-0000Pm-Gh for pgsql-performance@arkaria.postgresql.org; Wed, 14 Aug 2013 03:57:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V9SCu-0006qY-Sb for pgsql-performance@arkaria.postgresql.org; Wed, 14 Aug 2013 03:57:12 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V9SCu-0006qS-0U for pgsql-performance@postgresql.org; Wed, 14 Aug 2013 03:57:12 +0000 Received: from outmail148107.authsmtp.com ([62.13.148.107]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V9SCr-0003sr-6j for pgsql-performance@postgresql.org; Wed, 14 Aug 2013 03:57:11 +0000 Received: from mail-c235.authsmtp.com (mail-c235.authsmtp.com [62.13.128.235]) by punt12.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id r7E3v7VR051248; Wed, 14 Aug 2013 04:57:07 +0100 (BST) Received: from ayaki.localdomain (124-169-245-108.dyn.iinet.net.au [124.169.245.108]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id r7E3v1rT024960 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 14 Aug 2013 04:57:04 +0100 (BST) Message-ID: <520B000C.2030104@2ndquadrant.com> Date: Wed, 14 Aug 2013 11:57:00 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Pavel Stehule CC: "pgsql-performance@postgresql.org" Subject: Re: Interesting case of IMMUTABLE significantly hurting performance References: <520AD240.9060508@2ndquadrant.com> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: 95a9be1f-0495-11e3-b5c5-002590a15da7 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZeVg0b BQteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaQFbbExW HGQLWldEUFl7XGR/ aw8fbAdZfEtIVhto VE1XQ1JaCwdtAxke B1BcVWxxMQQEHH5y YU9kXj5YVUR8O094 E0cGQGxQeGdkYWUC UUENdB4GdVBPYx9F aFV2VCIMZDFWYTQC El17DAgcBxt4EgFg CiALMV8ITF0XHzgz DxsLBjhnGkNNZgAW EiAPAHoxVF0QPUMz P1oqUFQENw5aChBE A0BLD00RP1QbSS0x CApcVkN2 X-Authentic-SMTP: 61633235383639.1023:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 124.169.245.108/2525 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 08/14/2013 11:52 AM, Pavel Stehule wrote: > > If I understand, a used IMMUTABLE flag disables inlining. What you see, > is SQL eval overflow. > > My rule is - don't use flags in SQL functions, when it is possible. Interesting. I knew that was the case for STRICT, but am surprised to hear it's the case for IMMUTABLE as well. That seems ... counter-intuitive. Not to mention undocumented as far as I can see. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance