From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: One or more tables? |
Date: | 2007-12-03 00:18:52 |
Message-ID: | 47534B6C.7050705@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/02/07 14:58, Usama Dar wrote:
> 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.
Cluster by *range* of user ids, and preallocate some number of
tablespaces.
- --
Ron Johnson, Jr.
Jefferson LA USA
%SYSTEM-F-FISH, my hovercraft is full of eels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHU0tsS9HxQb37XmcRAhPoAJsESJL/Zs+SBRisowPXZbWQzIZqSgCeMEJE
uKC47H0oPOI6qxxCFpipD9E=
=A0ks
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Harvey, Allan AC | 2007-12-03 00:25:18 | Re: PostgresSQL vs Ingress |
Previous Message | Dragan Zubac | 2007-12-02 23:54:57 | Re: [HACKERS] Stored procedure issue |