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 1tpmJn-00BxOk-H0 for pgsql-general@arkaria.postgresql.org; Wed, 05 Mar 2025 10:49:39 +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 1tpmIm-007eQm-OV for pgsql-general@arkaria.postgresql.org; Wed, 05 Mar 2025 10:48:36 +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 1tpmIm-007eQe-De for pgsql-general@lists.postgresql.org; Wed, 05 Mar 2025 10:48:36 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tpmIk-0015ir-2E for pgsql-general@lists.postgresql.org; Wed, 05 Mar 2025 10:48:35 +0000 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2feae794508so9642955a91.0 for ; Wed, 05 Mar 2025 02:48:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741171714; x=1741776514; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2mhnwZWFFu9hRbFmzaXyUvxKvl+Bnp8LlbrrbPCkGFU=; b=ZRl7LANe9QfrMeijj2bCepBZLqqUgZK0IFjUDVYxUaEEYbwZ28U2/R0g3a192NDYTP HEUIT19+//H8hS87omtgIGpCJwIUOqL1nY1AeMCkWzVtQradw+nZR12zuJKeQEXGS0T2 g5hNFUfpGv+L1ezR11UEhgK5AhKIuWBo7agOhAuNDCuHSNh6hLxzBOpXSwJ26wymL6Pn YESn4yeuu4xdtkuo73i5qtkZLn/Wh+YVqBc6ky8uFC32D23Zqjy4kQwXKj7e03N6Wqdq 0eGjCksVQEp2DMlCiCBgP3HAD7QEJD0TfgyBThDdSvQc2ywI2gKqjdLDJKDv0QnYekil 4ajw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741171714; x=1741776514; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2mhnwZWFFu9hRbFmzaXyUvxKvl+Bnp8LlbrrbPCkGFU=; b=XmbtuyOw74cWBicNQxXq+kKCvV9P02eXUNPVM6pphgxdNcOrvgyAOGeeDzjiyJP1gp YRAvSI3XggftjrAG1kWzRSINagOR4TZoWfXnqs7kxBsF84TIGBKKva3OCo6nDHz1md35 xiUvXS1BSywiWk70ajMAHjctXZOk/ZD3YKGazEoNmGn19Sn+Q4kwVTtS2/b/ZSXIfYhq HBHC7jg/akQfplfSClmY5zthtQDzVXrmXqtqz69TiGmEaeW9xsOPKIgQuMu5wMJV69P9 FOJkrz94KYumfh7lXHDImuFnQ18p6DicXJrUtP60IbkJvhbf4rJIrTJ2210F1hs7sJ65 PR9A== X-Forwarded-Encrypted: i=1; AJvYcCXCmqaJPjHhoI2nIeWXgtqc/3HVIterZDhjxVnpBm4AT7EikLl7PMUtAyPayoeSBfqyALFlBQl/OU341/Zd@lists.postgresql.org X-Gm-Message-State: AOJu0YxU8fCsJ5hrYwiFaKAKoQHHR7r13oruRY86wqvLz/RFm8d5ovQf MslvcTyOGF08MGYRQBQRn0Od7mw3rx0hK/3N3Y0gBBpbubFqOhYQDzwuKmLeh1WX/HirtLXLxg+ 2k4gSnyx/piWbHvCy99qW7EZxkqY= X-Gm-Gg: ASbGncs9YmMsGMQ6gf3DyfivliTM57XLHveapHRPuHUUxbBI6aj9Nef0XdZD2InfGL8 t8twchwAv0tZYLGIibKMAj+zZMD43PYa6RMRX7V63pGAn3qDebK8h1Xrl4zJAilz5wJix24u06t 3ovpX5Hb4ccFnRagkCAbR1zv/aYbM= X-Google-Smtp-Source: AGHT+IEPvYxuEVsegtM7oym9sp7CGzvSTXYRXvlDe6NggtZ4oAFewlpr/TSpO3gq1oHu8MnOW5wfMJhfv8rG0gRhXFA= X-Received: by 2002:a17:90b:2702:b0:2ee:964e:67ce with SMTP id 98e67ed59e1d1-2ff4978cf93mr4244762a91.3.1741171713736; Wed, 05 Mar 2025 02:48:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: me nefcanto Date: Wed, 5 Mar 2025 14:18:20 +0330 X-Gm-Features: AQ5f1JqH31Bj8-Hc1srkjEyfh0QCU6dFO6bWGfEr2vt9KR10y7h_kgjzTyRuPZQ Message-ID: Subject: Re: Quesion about querying distributed databases To: Laurenz Albe Cc: Adrian Klaver , pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000007d85c0062f962192" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007d85c0062f962192 Content-Type: text/plain; charset="UTF-8" Dear Laurenz, That means a solid monolith database. We lose many goodies with that. As a real-world example, right now we can import a single database from the production to the development to test and troubleshoot data. What if we host all databases on the same server and use FDW. What happens in that case? Does it return 100 thousand records and join in the memory? Because in SQL Server, when you perform a cross-database query (not cross-server) the performance is extremely good, proving that it does not return 100 thousand ItemId from Taxonomy.ItemCategories to join with ProductId. Is that the same case with Postgres too, If databases are located on one server? Regards Saeed --0000000000007d85c0062f962192 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear Laurenz,=C2=A0

That means a solid monolith database. We= lose many goodies with that. As a real-world example, right now we can imp= ort a single database from the production to the development to test and tr= oubleshoot data.

What if we host all databases on the same server and us= e FDW. What happens in that case? Does it return 100 thousand records and j= oin in the memory?

Because in SQL Server, when you perform a cross-datab= ase query (not cross-server) the performance is extremely good, proving tha= t it does not return 100 thousand ItemId from Taxonomy.ItemCategories to jo= in with ProductId.

Is that the same case with Postgres too, If databases= are located on one server?

Regards
Saeed
--0000000000007d85c0062f962192--