Re: Caching of Queries - Mailing list pgsql-performance

From Neil Conway
Subject Re: Caching of Queries
Date
Msg-id 1095905663.22485.294.camel@localhost.localdomain
Whole thread Raw
In response to Re: Caching of Queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Caching of Queries
List pgsql-performance
On Thu, 2004-09-23 at 05:59, Tom Lane wrote:
> I think this would allow the problems of cached plans to bite
> applications that were previously not subject to them :-(.
> An app that wants plan re-use can use PREPARE to identify the
> queries that are going to be re-executed.

I agree; if you want to do some work in this area, making improvements
to PREPARE would IMHO be the best bet. For example, some people have
talked about having PREPARE store queries in shared memory. Another idea
would be to improve the quality of the plan we generate at PREPARE time:
for instance you could generate 'n' plans for various combinations of
input parameters, and then choose the best query plan at EXECUTE time.
It's a difficult problem to solve, however (consider multiple parameters
to PREPARE, for example).

-Neil



pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fw: Infinite CPU loop due to field ::type casting, Take II :-)
Next
From: Greg Stark
Date:
Subject: Re: NAS, SAN or any alternate solution ?