From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ben <bench(at)silentmedia(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: reasonable limit to number of schemas in a database? |
Date: | 2007-04-25 05:14:15 |
Message-ID: | 13743.1177478055@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ben <bench(at)silentmedia(dot)com> writes:
> I'm considering re-architecting a database to make use of many, many
> schemas.... over time, it would probably grow to be on the order of 3,000
> or so, with each schema holding ~100 tables. Is that an absurd amount, or
> well within postgres' limits? I haven't been able to find any information
> on what penalties one pays as you increase the schema count.
The number of schemas doesn't scare me so much as the number of tables.
Are you using a filesystem that can cope gracefully with 300K files in
one directory? How many of these tables do you anticipate any one
session touching? (That last translates to catalog cache and lock table
space...)
Generally, when someone proposes a scheme like this, they are thinking
that N identical tables are somehow better than one table with an
additional key column. The latter is usually the better design, unless
you have special requirements you didn't mention.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-04-25 05:22:15 | Re: Additional debugging of idle sessions? |
Previous Message | Benjamin Arai | 2007-04-25 04:25:12 | Re: Slow query using simple equality operators |