Re: 15,000 tables

From: Michael Riess <mlriess(at)gmx(dot)de>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: 15,000 tables
Date: 2005-12-01 16:28:44
Message-ID: dmn8bs$254u$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda pgsql-performance

Hi Tom,

> Michael Riess <mlriess(at)gmx(dot)de> 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

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Christian Bustos 2005-12-01 16:29:43 Re: alter de una tabla
Previous Message Jaime Casanova 2005-12-01 16:15:00 Re: 15,000 tables

Browse pgsql-performance by date

  From Date Subject
Next Message Markus Wollny 2005-12-01 16:30:42 Re: Queries taking ages in PG 8.1, have been much faster in PG<=8.0
Previous Message Tom Lane 2005-12-01 16:26:04 Re: Queries taking ages in PG 8.1, have been much faster in PG<=8.0