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 1u36k2-00Ag6W-SB for pgsql-general@arkaria.postgresql.org; Fri, 11 Apr 2025 05:15:51 +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 1u36k1-004s38-4W for pgsql-general@arkaria.postgresql.org; Fri, 11 Apr 2025 05:15:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u36k0-004s2z-Op for pgsql-general@lists.postgresql.org; Fri, 11 Apr 2025 05:15:49 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u36jz-004BLL-0O for pgsql-general@lists.postgresql.org; Fri, 11 Apr 2025 05:15:47 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5e61d91a087so2454379a12.0 for ; Thu, 10 Apr 2025 22:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1744348546; x=1744953346; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=PebSgzsJfKyssYzA5Swc34lS0Wz7Zq+V348++HQItug=; b=mEDhCyzNaE/VL4lV5eTjXJodcV8N+J86XNNPIBFzVyxnCSLGn6LUwdSrubCEvIYQ+x HhAU0vWJJ86ISzMr7NPK5bKsK59SNNsU5VzI8PZkj9lgG7RjMRqII1Jb/DmcfPt3wNVx NYBB3nT5TTEEDkPbCIiQe23WkvV9ZM6B1pwLvcNi1eglyAvX+3su84rdxf50NKOMHNb8 12B/eV5jTcvwVPCzSMFb9Xq9+UeGqa/fm4tqmqhG9NNh1/vtDtw/z6/OnhoTz/QqZ/Nh wxGVIB8hC6b911hXdQjxPNaAUoSG8jwUP+AVJm9AH7tIumcaZ7RSiGuk0dirq2qWzsg9 PpbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744348546; x=1744953346; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PebSgzsJfKyssYzA5Swc34lS0Wz7Zq+V348++HQItug=; b=VSWcIsHc5vle3KQHQanzcz7m2E4EYE5Pcy0OCKobGGJoQwGHaWdqz7/U5C3pgNNgaG thFjKWFqJESIZAonCDNgahXh8ildxfJbsFLKCTdpY2YdjQAA/xUvDIRBURhvVxZUSpoP vB/EOYtQCYG1K0n9h/krM3q2ReNKcjD5A0Obte2lYAyXjkG1nBaMm38F/HKAZkIiN819 xVCT4+iKdpDhK2s29yaJJuux/T6NCiCrpjzDcpsa9EqXPUv7H3NXKV5U9oX9dIsEyZgq raBTHD5BhEIbku9qcgmmZ19Tms03LakRoxIIdxoXs67NqRD5bDPS8iJCOJRA4y6Vz2Yr qgUQ== X-Forwarded-Encrypted: i=1; AJvYcCULG5sRtmYHyElSkcjwcjuC4uczjMrDSuNzyawbuFHsNVgV2R782ea7enP9WkfrYrMrn1xDDqHyfDJJgFqK@lists.postgresql.org X-Gm-Message-State: AOJu0YxyZBHpD5+5V4Xt8ZY3yEaqplg5kJZMm9SLTpt48lj5duJ0BHaI 46+mLvPgMSQBZWqu56xUCl0SNnPG8IuYxexLYr/lzDdhhcdq0M8Mv5CFilu01a0= X-Gm-Gg: ASbGncv3LVIkHHaA6aOW/yiEW+9ZE4asXnOtaCK8DpFtkWVKMsZ1OtQcqohtYLRH+MF X3uKGbelzTmGczqupKb7lz7b6R6zoDwffnwGE5zP/37V+FxjazVBsEKht09Abeku1+Xr6GZ+DGD THlfjxFc3mJ6Rj5C7mG3dv6w2BW4bYj/yCIwamYMzfln2fOvMpit8yJLha5jMCtVFJ7Rar3JgVH 8oW4L9hyMdRUUpsiSIG+IZcBUryHZhI726S51NUlz4bY/MtM3qrVnPjuuPvnJrno7ZY/iunmBya FBma72wd93yRc0EDxvBXXvoSoP8RYLsztK8x8jj+e94DoQ2otVos3jT3NLY+9g== X-Google-Smtp-Source: AGHT+IF/xVbjESNJVVy5ntGymszDN4JTIA/BAI/T2izX53w0S1KSYbI6LYBz/0Llcwn8MaqBGSqkyg== X-Received: by 2002:a17:907:9813:b0:ac3:f1de:a49a with SMTP id a640c23a62f3a-acad36d4c0bmr118342966b.52.1744348545558; Thu, 10 Apr 2025 22:15:45 -0700 (PDT) Received: from localhost.localdomain ([2001:871:255:52d3:3ac8:61ab:b634:342]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-acaa1c0227bsm381553166b.82.2025.04.10.22.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 22:15:45 -0700 (PDT) Message-ID: <9e5296eaa15b8f531a8e1190bca3f98cffa3262d.camel@cybertec.at> Subject: Re: Interesting case of IMMUTABLE significantly hurting performance From: Laurenz Albe To: Merlin Moncure , "David G. Johnston" Cc: Nico Williams , Adrian Klaver , Olleg Samoylov , "pgsql-generallists.postgresql.org" Date: Fri, 11 Apr 2025 07:15:44 +0200 In-Reply-To: References: <662101e2-5ca5-4bf5-9307-2519efde8690@ya.ru> <8687df7d49bc4b28b41c7cf4e9ad1e15d383b2fa.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2025-04-10 at 22:18 -0500, Merlin Moncure wrote: > Facts.=C2=A0 This is black magic.=C2=A0 =C2=A0This has come up over and o= ver.=C2=A0 Perhaps it would help to add the excellent information from the Wiki to the= documentation: https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions Yours, Laurenz Albe