Re: History
От | Alan Gutierrez |
---|---|
Тема | Re: History |
Дата | |
Msg-id | 200302011847.05686.ajglist@izzy.net обсуждение исходный текст |
Ответ на | History (Peter Childs <blue.dragon@blueyonder.co.uk>) |
Ответы |
Re: History
Re: History Re: History |
Список | pgsql-general |
On Friday 31 January 2003 05:27, you wrote: > Should I use inherrtance and have a different table for each table I > want history for or one table for the lot? > Table "public.history" > Column | Type | Modifiers > ---------+-----------------------------+----------- > tab | text | > field | text | > action | text | > before | text | > after | text | > occured | timestamp without time zone | > key | text | > who | text | > Indexes: history_tab btree (tab), > history_tab_field btree (tab, field), > history_tab_key btree (tab, "key"), > history_who btree (who) One table for the lot. If you use inheritance, it is my understanding that it will be the same thing, since all the data will be stored in the base table. The only thing you'd remove is the table name. Also, you don't need indices on both (tab) and (tab, field), the optimizer will happily use the latter, as it would the former. -- Alan Gutierrez - ajglist@izzy.net http://khtml-win32.sourceforge.net/ - KHTML on Windows
В списке pgsql-general по дате отправления: