X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 84B8E9DCAB5 for ; Thu, 1 Dec 2005 12:45:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71577-10 for ; Thu, 1 Dec 2005 12:45:46 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id C39899DCAB4 for ; Thu, 1 Dec 2005 12:45:46 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id jB1Gjknm078154 for ; Thu, 1 Dec 2005 16:45:46 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id jB1GSj5g070820 for pgsql-performance@postgresql.org; Thu, 1 Dec 2005 16:28:45 GMT (envelope-from news) From: Michael Riess X-Newsgroups: pgsql.performance Subject: Re: 15,000 tables Date: Thu, 01 Dec 2005 17:28:44 +0100 Organization: Hub.Org Networking Services Lines: 31 Message-ID: References: <11360.1133453022@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Thunderbird 1.5 (Windows/20051025) In-Reply-To: <11360.1133453022@sss.pgh.pa.us> To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=-1.44 required=5 tests=[ALL_TRUSTED=-1.44] X-Spam-Score: -1.44 X-Spam-Level: X-Archive-Number: 200512/26 X-Sequence-Number: 15847 Hi Tom, > Michael Riess writes: >> (We NEED that many tables, please don't recommend to reduce them) > > No, you don't. Add an additional key column to fold together different > tables of the same structure. This will be much more efficient than > managing that key at the filesystem level, which is what you're > effectively doing now. Been there, done that. (see below) > > (If you really have 15000 distinct rowtypes, I'd like to know what > your database design is...) Sorry, I should have included that info in the initial post. You're right in that most of these tables have a similar structure. But they are independent and can be customized by the users. Think of it this way: On the server there are 500 applications, and each has 30 tables. One of these might be a table which contains the products of a webshop, another contains news items which are displayed on the website etc. etc.. The problem is that the customers can freely change the tables ... add columns, remove columns, change column types etc.. So I cannot use system wide tables with a key column. Mike