Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CC33E1337B77 for ; Tue, 5 Oct 2010 12:15:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 40888-01 for ; Tue, 5 Oct 2010 15:15:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og117.obsmtp.com (exprod7og117.obsmtp.com [64.18.2.6]) by mail.postgresql.org (Postfix) with SMTP id DD86E1337B88 for ; Tue, 5 Oct 2010 12:15:18 -0300 (ADT) Received: from source ([209.85.215.176]) by exprod7ob117.postini.com ([64.18.6.12]) with SMTP ID DSNKTKtBBa+6BOsh2/7kBxO2nrEINXLCL1/y@postini.com; Tue, 05 Oct 2010 08:15:19 PDT Received: by eyg5 with SMTP id 5so3582756eyg.7 for ; Tue, 05 Oct 2010 08:15:16 -0700 (PDT) Received: by 10.14.37.77 with SMTP id x53mr7233880eea.38.1286291711414; Tue, 05 Oct 2010 08:15:11 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id u9sm9486082eeh.5.2010.10.05.08.15.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 05 Oct 2010 08:15:04 -0700 (PDT) Message-ID: <4CAB40F4.8030500@enterprisedb.com> Date: Tue, 05 Oct 2010 18:15:00 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.12) Gecko/20100913 Icedove/3.0.7 MIME-Version: 1.0 To: Robert Haas CC: Tom Lane , Shigeru HANADA , Itagaki Takahiro , Alvaro Herrera , SAKAMOTO Masahiko , pgsql-hackers Subject: Re: patch: SQL/MED(FDW) DDL References: <20100930164835.9FD2.6989961C@metrosystems.co.jp> <20101005211031.A022.6989961C@metrosystems.co.jp> <23621.1286288719@sss.pgh.pa.us> <23958.1286289686@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201010/276 X-Sequence-Number: 171316 On 05.10.2010 17:56, Robert Haas wrote: > On Tue, Oct 5, 2010 at 10:41 AM, Tom Lane wrote: >> (I'd also say that your performance estimate is miles in advance of any >> facts; but even if it's true, the caching ought to be inside the FDW, >> because we have no clear idea of what it will need to cache.) > > I can't imagine how an FDW could possibly be expected to perform well > without some persistent local data storage. Even assume the remote > end is PG. To return a cost, it's going to need the contents of > pg_statistic cached locally, for each remote table. Do you really > think it's going to work to incur that overhead once per table per > backend startup? It doesn't seem completely out of the question to me. Sure, it's expensive, but it's only incurred the first time a remote table is accessed in a session. Local persistent storage would be nice, but a lot of applications might prefer to not use it anyway, to ensure that fresh statistics are used. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com