From: | Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com> |
---|---|
To: | "Postgresql Performance" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Caching of Queries |
Date: | 2004-10-03 13:27:46 |
Message-ID: | opsfaqckygcq72hf@musicbox |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
> 1) The materialized data is available in 3 different forms; a list, a
> detail
> view, and a spreadsheet. Each form as somewhat different columns and
> different rules about ordering, which would likely confuse an SQC
> planner.
> In this implementation, all 3 forms are able to share the same cache.
See my proposal to cache function results.
You can create a cached function and :
SELECT your rows FROM cached_function(parameters) WHERE ... ORDER BY...
GROUP BY...
will only fetch the function result from the cache, and then the only
additional costs are the ORDER and GROUP BY... the query parsing is very
simple, it's just a select, and a "cached function scan"
I think caching can be made much more powerful if it is made usable like
this. I mean, not only cache a query and its result, but being able to use
cached queries internally like this and manipulaing them, adds value to
the cached data and allows storing less data in the cache because
duplicates are avoided. Thus we could use cached results in CHECK()
conditions, inside plsql functions, anywhere...
From | Date | Subject | |
---|---|---|---|
Next Message | Pierre-Frédéric Caillaud | 2004-10-03 13:30:05 | Re: Caching of Queries |
Previous Message | Pierre-Frédéric Caillaud | 2004-10-03 13:20:49 | Re: Caching of Queries |