Search Postgresql Archives

Re: Database design and triggers...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux