Search Postgresql Archives

Re: Is there any way to index or cache a view, or function results?

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

 



> I was hoping for something a bit more automatic with less maintenance from
> me.  Thank you for your reply.
> On 7/1/06, Jason Long <jason@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > Is it possible to define a function or view that performs fairly intensive
> > calculations and then index or cache these results?
> >
> > The data I have will be accessed more than modified, but still will be
> > modified semi regularly.
> >
> > Would someone please enlighten me on my options for improving performance
> is
> > this situation?
> 
> You could create a new table to store the results in and refresh it's
> contents every time the original data changes and you can index
> whatever you want, as long as you take into account that frequent and
> extensive changes to a table with a couple of indexes might slow
> things down a bit, depending on the number of changed records, the
> number of indices you define on the table and so on...
> You can keep the data in sync using triggers or with a periodic update
> task, depending on what kind of precision you need.

Perhaps an implemenation of a materialized view is more what you would like?
http://archives.postgresql.org/pgsql-performance/2004-02/msg00279.php
http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html



Regards,
Richard Broersma jr.



[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