pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Caching of Queries
Date: Sun, 03 Oct 2004 15:27:46 +0200
Message-ID: <opsfaqckygcq72hf@musicbox> (raw)
In-Reply-To: <200410011010.40705.josh@agliodbs.com>
References: <00e801c4a4b6$5526dd30$8300a8c0@solent>
	<20040930221107.GP1297@decibel.org>
	<415CEE8E.8060805@ymogen.net>
	<200410011010.40705.josh@agliodbs.com>


> 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...



view thread (72+ messages)  latest in thread

Message-ID: <opsfaqckygcq72hf@musicbox>
Permalink:  ../opsfaqckygcq72hf@musicbox/
Also on:    postgresql.org/message-id/opsfaqckygcq72hf@musicbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: lists@boutiquenumerique.com
  Subject: Re: Caching of Queries
  In-Reply-To: <opsfaqckygcq72hf@musicbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox