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 1v6SXh-004xof-Ns for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Oct 2025 11:41:13 +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 1v6SXf-009bYv-FP for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Oct 2025 11:41:12 +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 1v6SXf-009bYn-5j for pgsql-bugs@lists.postgresql.org; Wed, 08 Oct 2025 11:41:12 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v6SXZ-000f6p-0W for pgsql-bugs@lists.postgresql.org; Wed, 08 Oct 2025 11:41:10 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-b3c2c748bc8so1060073566b.2 for ; Wed, 08 Oct 2025 04:41:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1759923664; x=1760528464; 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=E0+YKzUPqd7NJU/hkId3WjV1vWWsCTf3jZX6fucDQVM=; b=nTxRYFlk7A1s21yyT/LxxhZINj5Hhr/Jo1CypXheonhfUaHZxO3ceH7QKW5Vs5TiM+ CRlumNEMhaS0bhWmHGDxLd4TsJQWHy0Z2RNTaLTjF0cqUM2i6MsngzqbsbI2TCNSMG6F 7VbNnSY1F59tbgEqsHr68exe6fqo8dpBfbHpR8RsH5cv11Z8f/+QtyLabIYKoAkBgE5q SPPaQpDTqkbVJD6zgILKFUxGRxdhpiNG/pKNf5uPOxO4MBoT0W9xQL71KmGv2nhyoJ83 SXIOsMzi87+Fa5Dd3gpBN+RN96qFTsfcu7kwY3DQObrenLkxkcFTAOk8BhyxymDPW4wD RsTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759923664; x=1760528464; 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=E0+YKzUPqd7NJU/hkId3WjV1vWWsCTf3jZX6fucDQVM=; b=mCATHLyGC9b+O4GA2BIUUzNnz0c6Mjx2oOvuFqhbvNbPHrcdU2kbdc062z1JDCE3DJ 9XTtYzXFkCyWtBqWACCvyfGJnXJdu1GU4uea2UFuMpgWgLQR8YjIbWIbJ+Tn7gPXA3RZ aFnN7RtHWiDNAPD7n1nSjM2M09uD/5F8kkQ1w+5c/AhVz/HSYQjyEqzveWEfx5fWzAs0 6+R/g0uaC6J0kyXlXIdryacN3IDMwOYopUPQAZ/2IQf29FXWaZEE5mcP6yFn90CabR5g H5xt9hPaihS9J31rKzyTup1XDmPKYAzT5+C+Gjq4WU5biGUsiwVs2K/jPSwW4a6uIjHY P4Sw== X-Gm-Message-State: AOJu0YyPuL3+LwjzmvLed/YdLlkwLpTDcQzLLLM5SwU3yMbXdoEur9/E jRQNu1KzNOMgRottZozANO+QoJYqKum/R+m81gs66LIlK0cS9m/xc7mpi6ymmFoXs/MpmQYmtd9 6kBUoFA8= X-Gm-Gg: ASbGncv5/XgmLXNErRNsI6hOjPHxQjt9+j/qcc0fuG3L8sVMpJ7OAv8w2X1Clss2agZ UXluR8lopMgVZwfa8gIWHejfZALjAcssERUrfLHZiz3rWDmeCYYoLilq2Cnj/7HgPGBC0FCZ5kn uxCBJpIGp2P4Go1Hc1B3OXvzbEbPVU2wB+nZatoRjnyfLCM1m3bq3tYsW46oLSJVZKctPd10y2K 0m78VA6+wxoGJdZZYfSQ+T3C7mM18itPLMw4O52P19cf+RvolnaQCp4+18ZHw8IKK+aKPv6+mWL muJztEab8ir4baRq3PfRdJLx3gjjKWr5k9dAGOKc7Lc34WRLfUnpyZD5wUsRn2PyWypWtulZKYx wxqHHtKWviqvX7YvBybUC0XAd2gXusI10QGOVjlgOQ4KaP0e6ozaipg2JArlalNXkA1MO5Q7btN bN X-Google-Smtp-Source: AGHT+IG3IfTxPpyyUO2qIlr5Rs5hDbxXrDU6qsmej79GHvBfS5lTPDuHXy10V5UQhlqg1F1KwZibHw== X-Received: by 2002:a17:907:7213:b0:b41:a571:21b0 with SMTP id a640c23a62f3a-b50ac1cc421mr312394466b.39.1759923663803; Wed, 08 Oct 2025 04:41:03 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([88.116.133.170]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-63788110224sm14416820a12.39.2025.10.08.04.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Oct 2025 04:41:03 -0700 (PDT) Message-ID: Subject: Re: BUG #19076: Generic query plan is extremely slow From: Laurenz Albe To: Premal Patel , David Rowley Cc: pgsql-bugs@lists.postgresql.org Date: Wed, 08 Oct 2025 13:41:03 +0200 In-Reply-To: <8FE9EC49-C928-406C-A37B-47AE4AB397DE@veeva.com> References: <8FE9EC49-C928-406C-A37B-47AE4AB397DE@veeva.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-10-08 at 07:17 -0400, Premal Patel wrote: > Would it be unsafe to set =E2=80=9Cplan_cache_mode=E2=80=9D to =E2=80=9Cf= orce_custom_plan=E2=80=9D > for the entirety of the connection? No, that's not unsafe at all, but you'd lose the performance advantage of reusing plans, which can be substantial for short statements. Yours, Laurenz Albe