Re: Best practices for aggregate table design

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: droberts <david(dot)roberts(at)riverbed(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Best practices for aggregate table design
Date: 2015-10-06 19:07:50
Message-ID: CAKFQuwZfkTe01mWgsOJvgqdX4qN8Ctv8ABafyLLupCemTyVsmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 6, 2015 at 2:53 PM, droberts <david(dot)roberts(at)riverbed(dot)com> wrote:

>
> month | city_id | state_id | total_calls_inbound | total_calls_outbound |
> total_calls_inbound_encr | total_calls_outbound_encr |
>
> getting a bit hairy but the alternative seems like it would start growing
> too quickly in rows and more I/O for inserts.
>
> month | city_id | state_id | encrypted | type | total_calls
>
> 2015-01 12 2 true, false, 56
> 2015-01 10 4 true, true, 147
> 2015-01 null null 201 17 218
>

​A bit beyond my experience but my gut tells me I would choose the later
over the former. It even has a name - star schema.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hellmuth Vargas 2015-10-06 19:17:30 Re: [GENERAL] No funciona WITH con mas de 2 sentencias DML
Previous Message Alvaro Herrera 2015-10-06 19:01:27 Re: [GENERAL] No funciona WITH con mas de 2 sentencias DML