Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9E0299FA1B0 for ; Tue, 28 Aug 2007 10:50:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 04732-10 for ; Tue, 28 Aug 2007 10:49:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1FEDF9FA1C6 for ; Tue, 28 Aug 2007 10:49:59 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l7SDnQBe023415; Tue, 28 Aug 2007 09:49:27 -0400 (EDT) To: robins@pobox.com cc: pgsql-performance@postgresql.org Subject: Re: Performance across multiple schemas In-reply-to: <36af4bed0708280605j5448ac52of6f7dc08791f0ab2@mail.gmail.com> References: <36af4bed0708280605j5448ac52of6f7dc08791f0ab2@mail.gmail.com> Comments: In-reply-to Robins message dated "Tue, 28 Aug 2007 18:35:24 +0530" Date: Tue, 28 Aug 2007 09:49:26 -0400 Message-ID: <23414.1188308966@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/341 X-Sequence-Number: 26471 Robins writes: > Could someone confirm as to whether a query across multiple schemas is known > to have any kind of a degraded performance ? Schemas are utterly, utterly irrelevant to performance. I'm guessing you missed analyzing one of the tables, or forgot an index, or something like that. Also, if you did anything "cute" like use the same table name in more than one schema, you need to check the possibility that some query is selecting the wrong one of the tables. The explain output you showed is no help because the expense is evidently down inside one of the functions in the SELECT output list. One thing you should probably try before getting too frantic is re-ANALYZEing all the tables and then starting a fresh session to clear any cached plans inside the functions. If it's still slow then it'd be worth digging deeper. regards, tom lane