One big table or several smaller tables ?

Поиск
Список
Период
Сортировка
От AarniRuuhimäki / Megative Tmi / KYMI.com
Тема One big table or several smaller tables ?
Дата
Msg-id 0202201437170A.07110@kymi2
обсуждение исходный текст
Ответы Re: One big table or several smaller tables ?  (Jason Earl <jason.earl@simplot.com>)
Список 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 по дате отправления:

Предыдущее
От: Cyril Samovskiy
Дата:
Сообщение: Re: [HACKERS] foreign key is from different tables - what to do?
Следующее
От: Jon Hassen
Дата:
Сообщение: Adding CLUSTERING removed my indexes