X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0E1E79FA326 for ; Wed, 24 May 2006 00:09:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 02729-01 for ; Wed, 24 May 2006 00:09:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5D9D09F9D99 for ; Wed, 24 May 2006 00:09:01 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k4O38wrc025041; Tue, 23 May 2006 23:08:58 -0400 (EDT) To: "Tony Wasson" cc: "Jim C. Nasby" , "Jorge Godoy" , pgsql-general@postgresql.org Subject: Re: [SQL] (Ab)Using schemas and inheritance In-reply-to: <6d8daee30605231754s58364cd1o79a6520f203a1734@mail.gmail.com> References: <200605231716.58784.jgodoy@gmail.com> <20060523232609.GP64371@pervasive.com> <6d8daee30605231754s58364cd1o79a6520f203a1734@mail.gmail.com> Comments: In-reply-to "Tony Wasson" message dated "Tue, 23 May 2006 17:54:09 -0700" Date: Tue, 23 May 2006 23:08:58 -0400 Message-ID: <25040.1148440138@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/1128 X-Sequence-Number: 95920 "Tony Wasson" writes: > $.02 about lots of schemas. > I worked with an application that had 500 schemas and that worked very > well. However, as the number of schemas exceeeded 8000 the query speed > started to degrade. Running \d with a single schema in your search > path took a few seconds with that many schemas. Queries that were > running in 100ms were now taking about 600ms. Note that this probably says more about \d than about anything else. I can believe that having a large number of schemas listed in your search path would suck, but there's not a good reason for lots of schemas unrelated to your session to cause you any great pain. (\d does some searching that might be impacted by lots of schemas, but that doesn't say ordinary queries would be.) If you've got a counterexample please file a bug with details ... regards, tom lane