Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u36yX-00Ajmm-QV for pgsql-general@arkaria.postgresql.org; Fri, 11 Apr 2025 05:30:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u36yW-0053tJ-3j for pgsql-general@arkaria.postgresql.org; Fri, 11 Apr 2025 05:30:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u36yV-0053tA-ID for pgsql-general@lists.postgresql.org; Fri, 11 Apr 2025 05:30:48 +0000 Received: from seahorse.cherry.relay.mailchannels.net ([23.83.223.161]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u36yS-004eSR-1z for pgsql-general@lists.postgresql.org; Fri, 11 Apr 2025 05:30:47 +0000 X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C8BFA4E4287; Fri, 11 Apr 2025 05:30:41 +0000 (UTC) Received: from pdx1-sub0-mail-a297.dreamhost.com (trex-5.trex.outbound.svc.cluster.local [100.107.20.214]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 425064E35DD; Fri, 11 Apr 2025 05:30:41 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1744349441; a=rsa-sha256; cv=none; b=N45mwaJxOxHmvIPUxsoQAAV6NAWUtkUEE5MT0pMUgXs/OfMwYGCbheFuLPRapiJ7MMjGsC tDK3V+EW7FBZ0wZ4Z2HERfXTWE6l34wptubwqo7BaonNV8cYC4ZEj/v9rvmrUbwiyhIl+d aBgCjSboJSl9oa2dKUEvVNs6X7yALBqWiJzjM/xa9YD0YN6sdmuvDpewp9/gvDZL/lmMZC VwY4LLNzitxZ3V9tSKtAZv7Z3xqSqG3iRtv2akExHfffdJ5z7xFoQRKdjKyIT1aXuoBr47 z+rpma37H4yIGcHhsdkcZ2HxrYUY3VBviG7a4/uL3Wi4zWxhn4j9wAsbnb/Lww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1744349441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/pKG/sTD74y+lioAaCJHiJQS1gYO3b7K5pLYojXow7Q=; b=pH94lKKMrIarjwvqDCQUMKSYRN5AaUrhd6FR0pn2DCYxd7o6o5g0/L3JdZImuRSmQLQ9ii ZBinEFlnLg+XC/pigdtM11M2tesWbfgEj4OjwPKPgO199MObAeSW+6ZQkf1w/T+E9GZFhL CZ10QFcXm7TBhahbkxsExhRv3udE9SBm4mx2hvX8q5pO6POMgMi7y9PMUMwVjnisjL3+/4 LLwm3SeMFuULf/ycv6dUyJO5V6iRtjHVgQki5BPmF7aIPAShd6aoFIiwKGbCtdAXpETUiw 1ALrYM49iEIe3c7TPe0q8EqopQ1rlWyfERObIh2lyGlbAMCRuXBe58t/JAXIPg== ARC-Authentication-Results: i=1; rspamd-7d787bdb4f-gmshw; auth=pass smtp.auth=dreamhost smtp.mailfrom=nico@cryptonector.com X-Sender-Id: dreamhost|x-authsender|nico@cryptonector.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|nico@cryptonector.com X-MailChannels-Auth-Id: dreamhost X-Callous-Invention: 5f9ebb413ecbc8aa_1744349441541_1798909067 X-MC-Loop-Signature: 1744349441540:549625615 X-MC-Ingress-Time: 1744349441540 Received: from pdx1-sub0-mail-a297.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.107.20.214 (trex/7.0.3); Fri, 11 Apr 2025 05:30:41 +0000 Received: from ubby (syn-075-081-095-064.res.spectrum.com [75.81.95.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a297.dreamhost.com (Postfix) with ESMTPSA id 4ZYldX2nHVzM7; Thu, 10 Apr 2025 22:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptonector.com; s=dreamhost; t=1744349441; bh=/pKG/sTD74y+lioAaCJHiJQS1gYO3b7K5pLYojXow7Q=; h=Date:From:To:Cc:Subject:Content-Type:Content-Transfer-Encoding; b=UEYtOEkLXIDfr718TgYgHmqrasBVafyPGAHfhT7wL+UJT9wD4WqoYtl9fNTogQb+v OiWAngnthMQwficy2WwWZt+hbgfI86+jyxVZBlvWN1XwGsIH3KOp5mlIlGzBRn783j bhzyc2S5Tt5nbx7x1a3T4e1khQhICVX1M72LGMHLbLBbSMOgFdzOSQrbZbyde6uLtX 1CYIVWFmjzCCwVQ43XF1PppUP6SfchaUMSA9zbsyWvN5+B0P4xdJ2sz2oAz6s/BgfZ soZ4aNVsZQZmDL+lHS/8/CDg15Xxsyrx9NXKWFQvqJ77lrEBMDU8G419eCCqrvU6ZV qzwRg3d2Vqu8Q== Date: Fri, 11 Apr 2025 00:30:38 -0500 From: Nico Williams To: Laurenz Albe Cc: Merlin Moncure , "David G. Johnston" , Adrian Klaver , Olleg Samoylov , "pgsql-generallists.postgresql.org" Subject: Re: Interesting case of IMMUTABLE significantly hurting performance Message-ID: References: <662101e2-5ca5-4bf5-9307-2519efde8690@ya.ru> <8687df7d49bc4b28b41c7cf4e9ad1e15d383b2fa.camel@cybertec.at> <9e5296eaa15b8f531a8e1190bca3f98cffa3262d.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9e5296eaa15b8f531a8e1190bca3f98cffa3262d.camel@cybertec.at> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 11, 2025 at 07:15:44AM +0200, Laurenz Albe wrote: > On Thu, 2025-04-10 at 22:18 -0500, Merlin Moncure wrote: > > Facts.  This is black magic.   This has come up over and over.  > > Perhaps it would help to add the excellent information from the Wiki to the documentation: > https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions Adding a warning in the functions _docs_ to check their various attributes in the cataclog would suffice.