Re: Multiple databases one directory - Mailing list pgsql-performance

From Tom Lane
Subject Re: Multiple databases one directory
Date
Msg-id 27964.1043455824@sss.pgh.pa.us
Whole thread Raw
In response to Multiple databases one directory  (Noah Silverman <noah@allresearch.com>)
Responses Re: Multiple databases one directory
List pgsql-performance
Noah Silverman <noah@allresearch.com> writes:
> We have a situation where we will be creating two fairly large and
> complex databases with many tables (thousands) each.  From what I
> understand, postgres keeps everything in one big data directory.

Yeah.  You're kind of at the mercy of the operating system when you do
that: if it copes well with big directories, no problem, but if lookups
in big directories are slow then you'll take a performance hit.

The first thing I'd ask is *why* you think you need thousands of
tables.  How will you keep track of them?  Are there really thousands of
different table schemas?  Maybe you can combine tables by introducing
an extra key column.

Perhaps a little bit of rethinking will yield a small design screaming
to get out of this big one ...

            regards, tom lane

pgsql-performance by date:

Previous
From: Carlos Moreno
Date:
Subject: Re: Having trouble with backups (was: Re: Crash Recovery)
Next
From: Noah Silverman
Date:
Subject: Re: Multiple databases one directory