One big table or several smaller tables ? - Mailing list pgsql-novice

From AarniRuuhimäki / Megative Tmi / KYMI.com
Subject One big table or several smaller tables ?
Date
Msg-id 0202201437170A.07110@kymi2
Whole thread Raw
Responses Re: One big table or several smaller tables ?
List 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

pgsql-novice by date:

Previous
From: Cyril Samovskiy
Date:
Subject: Re: [HACKERS] foreign key is from different tables - what to do?
Next
From: Jon Hassen
Date:
Subject: Adding CLUSTERING removed my indexes