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 1l5VVQ-0005XD-Lb for pgsql-general@arkaria.postgresql.org; Fri, 29 Jan 2021 15:16:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l5VVP-0007Hj-74 for pgsql-general@arkaria.postgresql.org; Fri, 29 Jan 2021 15:16:15 +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 1l5VVO-0007Hc-Vi for pgsql-general@lists.postgresql.org; Fri, 29 Jan 2021 15:16:14 +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 1l5VVM-00066g-Jy for pgsql-general@lists.postgresql.org; Fri, 29 Jan 2021 15:16:14 +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 10TFG5YP2781127; Fri, 29 Jan 2021 10:16:05 -0500 From: Tom Lane To: Thomas Kellerer cc: "Markhof, Ingolf" , pgsql-general@lists.postgresql.org Subject: Re: Foreign table performance issue / PostgreSQK vs. ORACLE In-reply-to: <7289a882-66eb-c0d4-dc7a-c6ab16eb0201@gmx.net> References: <7289a882-66eb-c0d4-dc7a-c6ab16eb0201@gmx.net> Comments: In-reply-to Thomas Kellerer message dated "Fri, 29 Jan 2021 15:40:21 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2781125.1611933365.1@sss.pgh.pa.us> Date: Fri, 29 Jan 2021 10:16:05 -0500 Message-ID: <2781126.1611933365@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Kellerer writes: > Markhof, Ingolf schrieb am 29.01.2021 um 13:56: >> So, I wonder: Is there a fundamental difference between Oracle >> database links and foreign tables in PostgreSQL that could explain >> the different run times? > My guess is, that your queries use predicates that can't be pushed down > to the foreign server on Postgres, but Oracle can. > If my assumption is correct, then maybe if you showed one example query, > it might be possible to figure out a way to restructure it. More generally: https://wiki.postgresql.org/wiki/Slow_Query_Questions These sorts of questions seldom have generic fixes, but if you give us enough detail, we might be able to help. regards, tom lane