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 1l1zI9-0008Lw-HT for pgsql-general@arkaria.postgresql.org; Tue, 19 Jan 2021 22:16:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1zI8-0001P2-6o for pgsql-general@arkaria.postgresql.org; Tue, 19 Jan 2021 22:16:00 +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 1l1zI7-0001Ov-Vf for pgsql-general@lists.postgresql.org; Tue, 19 Jan 2021 22:15:59 +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 1l1zI1-000230-TC for pgsql-general@lists.postgresql.org; Tue, 19 Jan 2021 22:15:59 +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 10JMFl8x551427; Tue, 19 Jan 2021 17:15:47 -0500 From: Tom Lane To: Alexander Stoddard cc: Michael Lewis , "pgsql-generallists.postgresql.org" , "David G. Johnston" , Thomas Kellerer Subject: Re: Accounting for between table correlation In-reply-to: References: Comments: In-reply-to Alexander Stoddard message dated "Tue, 19 Jan 2021 16:03:53 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <551425.1611094547.1@sss.pgh.pa.us> Date: Tue, 19 Jan 2021 17:15:47 -0500 Message-ID: <551426.1611094547@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexander Stoddard writes: > Thank you for this. I can get different plans by changing the different > parameters, but if the output of EXPLAIN VERBOSE tells me geqo planning > specifically is being used I'm not seeing it. Is there a way to see in the > explain plan if geqo was used? It's not reported directly, but you can assume that it was used if the number of relations in the query (the number of table scans in the plan, more or less) is >= geqo_threshold. Or if you're unsure, check whether turning the "geqo" boolean on/off changes the plan at all. In theory you might get exactly the same plan from the regular and geqo planners, but for reasonable values of geqo_threshold that's pretty unlikely, I think. (Another way to be sure might be to notice whether turning geqo on/off changes the planning time significantly. geqo off should be a great deal more expensive for large plans.) regards, tom lane