Re: Store derived data or use view?

From: "Hartman, Matthew" <Matthew(dot)Hartman(at)krcc(dot)on(dot)ca>
To: "gvimrc" <gvimrc(at)googlemail(dot)com>, "pgsql" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Store derived data or use view?
Date: 2009-07-03 17:46:30
Message-ID: 366642367C5B354197A1E0D27BC175BD0225982C@KGHMAIL.KGH.ON.CA
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If it's static (i.e. the planets don't move too much, hah), calculate
and store. No sense in re-calculating it each and every time.

Matthew Hartman
Programmer/Analyst
Information Management, ICP
Kingston General Hospital
(613) 549-6666 x4294

> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of gvimrc
> Sent: Friday, July 03, 2009 1:08 PM
> To: pgsql
> Subject: [GENERAL] Store derived data or use view?
>
> I have a table which stores the absolute longitude of a planetary
> position, eg:
>
> MERCURY
> ---------------
> 157.65
>
> SATURN
> -------------
> 247.65
>
> When 2 planets are a certain distance apart there is an 'aspect', eg.
90
> degrees is a "square" aspect
>
> I wish to record these aspects for different user profiles and
eventually
> do searches for users who have the same aspect(s). Would it be better,
in
> terms of search speed/efficiency, to calculate and store the aspect
data,
> eg. Mercury/Saturn square, or should I just store the longitude data
and
> create a view with the calculated aspects? I anticipate a large
dataset of
> users so search speed/efficiency is very important.
>
> gvim
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general.now.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2009-07-03 18:29:45 Re: Q: data modeling with inheritance
Previous Message gvimrc 2009-07-03 17:08:17 Store derived data or use view?