Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT4iV-0007CG-57 for pgsql-general@arkaria.postgresql.org; Tue, 30 Aug 2022 17:07:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oT4iU-0005oC-21 for pgsql-general@arkaria.postgresql.org; Tue, 30 Aug 2022 17:07:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT4iT-0005nv-OL for pgsql-general@lists.postgresql.org; Tue, 30 Aug 2022 17:07:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT4iR-0001ek-DW for pgsql-general@postgresql.org; Tue, 30 Aug 2022 17:07:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27UH7pAo3695160; Tue, 30 Aug 2022 13:07:51 -0400 From: Tom Lane To: Alvaro Herrera cc: Matheus Martin , pgsql-general@postgresql.org Subject: Re: Missing query plan for auto_explain. In-reply-to: <20220830164512.7oq5g7i256b3zvzp@alvherre.pgsql> References: <20220830164512.7oq5g7i256b3zvzp@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 30 Aug 2022 18:45:12 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3695158.1661879271.1@sss.pgh.pa.us> Date: Tue, 30 Aug 2022 13:07:51 -0400 Message-ID: <3695159.1661879271@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2022-Aug-30, Matheus Martin wrote: >> Good idea on using an actual prepared statement but unfortunately it didn't >> produce any different result. > I should have also mentioned to try the EXPLAIN EXECUTE six times and > see if the last one produces a different plan. That's when it switches > from planning every time to planning with generic arguments, as I > recall. In recent versions you can bypass that with SET plan_cache_mode = force_generic_plan; regards, tom lane