Re: table design strategy

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: table design strategy
Date: 2002-03-28 18:04:16
Message-ID: 20020328130416.K7297@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 28, 2002 at 12:28:40PM -0500, Johnson, Shaunn wrote:
> -- While I do, what about this:
>
> -- * Append all of the 2000 and 2001 tables into one table
> -- * Make index of columns in the one table
> -- * For updates and new imports, create a
> -- method to only append new data / updates
> -- (I imagine this is where the trigger function comes
> -- in, right?) when I have to pull data (the source tables
> -- will be much smaller ... hopefully ...

Right, the trigger will only fire on insert/update/delete, so you'd
have to populate the big table manually. But after that, with a
trigger on all the source tables, any change you make there will also
be reflected in table_all.

Note that doing it this way is a very un-SQL-ish thing to do, in that
you'll have redundant data all over the place. Still, given what you
already have, doing it this way might be a quick and dirty answer for
looking at the big table. Of course, if you hardly ever reference
the big table, maybe it isn't worth the storage cost.

A
--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Riebs, Andy 2002-03-28 18:09:44 Re: Performance Tuning Document?
Previous Message Marcelo Pereira 2002-03-28 17:45:56 Re: Sum