Re: Number of tables

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Craig James <craig_james(at)emolecules(dot)com>
Cc: fabio(dot)lafarcioli(at)molinoalimonti(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Number of tables
Date: 2009-08-20 21:41:57
Message-ID: 407d949e0908201441u696ff77bp9a8786a9fcdb0046@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Aug 20, 2009 at 9:16 PM, Craig James<craig_james(at)emolecules(dot)com> wrote:
> Fabio La Farcioli wrote:
>>
>> i am developing a web app for thousands users (1.000/2.000).
>>
>> Each user have a 2 table of work...I finally have 2.000 (users) x 2 tables
>> = 4.000 tables!
>>
>> Postgres support an elevate number of tables??
>> i have problem of performance ???

What you want is a multi-column primary key where userid is part of
the key. You don't want to have a separate table for each user unless
each user has their own unique set of columns.

> When the user logs back in, a hidden part of the login process gets a table
> from the pool of available tables, assigns it to this user, and copies the
> user's  data from the archive into this personal table.  They are now ready
> to work. This whole process takes just a fraction of a second for most
> users.

And what does all this accomplish?

--
greg
http://mit.edu/~gsstark/resume.pdf

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig James 2009-08-20 22:18:59 Re: Number of tables
Previous Message Craig James 2009-08-20 20:16:06 Re: Number of tables