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-02 18:30:11 |
Message-ID: | 4752F9B3.90106@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 07:35, rokj 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)
This should help you to decide how to design your tables. 3NF is as
far as you really need to go.
http://en.wikipedia.org/wiki/Data_normalization
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=88
- --
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)
iD8DBQFHUvmzS9HxQb37XmcRAnNhAJ4/bMbLyDXioe7duTO4Dm0vBD8TCgCg3H84
/+gRlkgyuIlRYYGOGH8LWPM=
=LfO7
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2007-12-02 18:49:53 | Re: "relation deleted while in use" encountered with Postgresql 8.0.8 |
Previous Message | Ron Johnson | 2007-12-02 18:22:50 | Re: postgresql in ramdisk |