One big table or several smaller tables ?

From: Aarni Ruuhimäki / Megative Tmi / KYMI(dot)com <aarni(dot)ruuhimaki(at)kymi(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: One big table or several smaller tables ?
Date: 2002-02-20 12:38:08
Message-ID: 0202201437170A.07110@kymi2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi !

I have a general design question:

We plan to collect sales events / data from approx. 50 outlets (shops).

We are expecting 200 000 events annually.

Would it be wiser to have a table for each outlet or one big table for
everything ? (a dozen fields or so in both cases)

I.e. which one is faster to pull reports from ? E.g. after five years, if we
want to know the number of refrigerators sold between may and august for each
year and for each outlet, go through one table with million rows or 50 tables
with 20 000 rows ?

'Query-wise' it would be much simpler to have one big table, but how about
the performance ?

TIA and keep on keeping on !

aarni

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Pam Wampler 2002-02-20 14:25:24 inserting a timestamp show wrong timezone
Previous Message Pam Wampler 2002-02-19 22:11:27 Gettting Error When Loading Timestamp Field