Re: Database design and triggers...

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: Database design and triggers...
Дата
Msg-id 20060910204440.30807.qmail@web31802.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: Database design and triggers...  (romantercero@gmail.com)
Ответы Re: Database design and triggers...  (romantercero@gmail.com)
Список pgsql-general
> Hi Brandon,
>
> Thank you for your response.
>
> Yes, I see what you mean when you say that I can list Qty in signed
> integers and use a view. Good point.
>
> But I'm not sure as to using a view vs using a permanent table updated
> by triggers. It seems we are dealing with the clasic tradeoff between
> speed & storage space.
>
> A permanent table would duplicate data and even though it would toll
> write operations I suspect it would be faster than users bringing up a
> view every time they wish to execute a transaction.
>
> Any Sugestions as to which way I should go on the tradeoff and why?

A permanent table updated on triggers sounds like a "Materialized" View.  A view must be process
everytime it is called.  A Materialized view can have its data processed in various ways.
Depending upon your requirements, you can select a materialized view  that will get you what you
want with a smaller preformance hit.
http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html
http://www.varlena.com/varlena/GeneralBits/64.php
http://www.revsys.com/blog/archive/9

В списке pgsql-general по дате отправления:

Предыдущее
От: Dino Vliet
Дата:
Сообщение: Re: execute in pl/pgsql
Следующее
От: Jean-Gerard Pailloncy
Дата:
Сообщение: Certificate, login & php question ?