Large database design advice

From: "Joe Kramer" <cckramer(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Large database design advice
Date: 2006-08-24 16:05:53
Message-ID: b4c00a110608240905j344834adl79c510d56fcbbc2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I am designing database for a web product with large number of data records.

- Few tables but number of objects is tens-hundreds of thousands.
- less than 100 queries per second.

The application has basically tens thousands of (user) accounts,
every account has associated hundreds of items.

My initial thought is to design it like this:

Table: account
---------------------
account_id BIGSERIAL

Table: item
---------------------
account_id BIGINT
item_id INT

Questions:

Should table account be designed with BIGSERIAL key, or if it's going
to have six-digit number of records, other method should be used?

Should I use compound key for table item (account_id+item_id) or
item_id should be BIGSERIAL and global sequence with key being only
item_id?

How generally this design will hold up against this amount of data?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jasbinder Bali 2006-08-24 16:08:58 Dynamic loading (datatype mismatch)
Previous Message Peter Eisentraut 2006-08-24 15:55:56 Re: invalid byte sequence ?