Re: table design strategy
От | Andrew Sullivan |
---|---|
Тема | Re: table design strategy |
Дата | |
Msg-id | 20020328130416.K7297@mail.libertyrms.com обсуждение исходный текст |
Ответ на | Re: table design strategy ("Johnson, Shaunn" <SJohnson6@bcbsm.com>) |
Список | 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@libertyrms.info> M6K 3E3 +1 416 646 3304 x110
В списке pgsql-general по дате отправления: