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 1s9QKR-002CdM-4z for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 14:19:00 +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 1s9QKR-00AVOA-64 for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 14:18:59 +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 1s9QKQ-00AVNW-RG for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 14:18:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9QKO-001Io3-2c for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 14:18: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 44LEIqgC3901402; Tue, 21 May 2024 10:18:52 -0400 From: Tom Lane To: =?UTF-8?B?U2HFoW8gR2FudGFy?= cc: Laurenz Albe , David Rowley , pgsql-general@lists.postgresql.org Subject: Re: problem with query In-reply-to: References: Comments: In-reply-to =?UTF-8?B?U2HFoW8gR2FudGFy?= message dated "Tue, 21 May 2024 12:49:08 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3901398.1716301132.1@sss.pgh.pa.us> Date: Tue, 21 May 2024 10:18:52 -0400 Message-ID: <3901400.1716301132@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =?UTF-8?B?U2HFoW8gR2FudGFy?= writes: > thanks for the info, but is there any solution, given that it's system > tables? Given the complexity of the query, I wonder if you're running into problems with join_collapse_limit/from_collapse_limit preventing the planner from considering all options. Also, as David already mentioned, ANALYZE on pg_class might help. regards, tom lane