Re: Design question: Scalability and tens of thousands of tables?

From: James Robinson <jlrobins(at)socialserve(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: zackchandler(at)hotmail(dot)com
Subject: Re: Design question: Scalability and tens of thousands of tables?
Date: 2005-11-04 15:11:36
Message-ID: 0B8DCA82-39EE-4444-9412-20779E51CCDD@socialserve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Nov 4, 2005, at 9:47 AM, pgsql-sql-owner(at)postgresql(dot)org wrote:

> The problem is I am very concerned about scalability with having a
> different
> table created for each custom object. I want to design to site to
> handle
> tens of thousands of users. If each user has 3-5 custom objects the
> database would have to handle tens of thousands of tables.
>
> So it would appear that this is a broken solution and will not
> scale. Has
> anyone designed a similar system or have ideas to share?

Well, before you discount it, did you try out your design? You could
do initial segregation of user's tables into separate schemas (say,
schema 'a' -> 'z' according to username or some better hashing
routine like brute-force round-robin assignment at user creation
time). Assignment of objects -> schema would be one additional column
in your centralized user directory table(s).

----
James Robinson
Socialserve.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Browne 2005-11-04 23:59:08 Re: Design question: Scalability and tens of thousands of tables?
Previous Message Tom Lane 2005-11-04 14:47:58 Re: Changing location of ORDER BY has large effect on performance, but not results...