From: | "Usama Dar" <munir(dot)usama(at)gmail(dot)com> |
---|---|
To: | rokj <rjaklic(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: One or more tables? |
Date: | 2007-12-02 20:58:54 |
Message-ID: | ff0e67090712021258n2bb456b5x92bd54ac70ff9ed2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Dec 2, 2007 6:35 PM, rokj <rjaklic(at)gmail(dot)com> wrote:
> Hi.
>
> For an example let me say that I have a big (over 1 million) user
> "base". Then every user does a lot of inserting/updating of data.
> Would it be better to create different tables for insert/updating for
> every user or would it be better just to have one big table with all
> data (tables would have of course the same columns, ...). How do you
> cope with this kind of things?
>
> 1.example (1 enormous table)
> tablename (id, user_id, datetime, some_data)
>
> 2. example (a big number of tables)
> tablename_user_id( id, datetime, some_data)
Although there isn't enough information in the email, but instead of
creating a separate table for every user, you could use one table ,
partitioned on userid, that would , however, add a maint overhead whenever
you add a new user.
>
>
> Thank you.
>
> Kind regards,
>
> Rok
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
--
Usama Munir Dar http://linkedin.com/in/usamadar
Consultant Architect
Cell:+92 321 5020666
Skype: usamadar
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2007-12-02 20:58:56 | Re: full_page_writes = off? |
Previous Message | Usama Dar | 2007-12-02 20:39:14 | Re: [HACKERS] Stored procedure issue |