pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: statement caching proof of concept redux
Date: Thu, 1 Mar 2007 20:59:29 -0500
Message-ID: <B5078593-14F0-49DA-B547-BB54979D6A59@fastcrypt.com> (raw)
In-Reply-To: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com>
References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com>

In June I posted this.

Since then we have some real results so I'd like to solicit ideas  
from the group about implementing statement caching.

First and foremost it would be off by default and have to be  
explicitly turned on. After that I'm wondering about parameters which  
would affect resources. Would we want connection/database/driver  
connection limits ? Do we do this by number of prepared statements ?  
Overall memory consumption ?  Then there is aging of cached  
statements; any ideas on how to age them? Will they need to be  
invalidated after so much time ?


Any and all ideas are welcome.

I will post definitive results shortly. I've been promised them for a  
few days now.

Dave

On 19-Jun-06, at 12:55 PM, Dave Cramer wrote:

> This is just proof of concept. More work has to be done to make it  
> build properly and work properly under different jdk's
>
> Couple of questions.
>
> 1) What to do if there are multiple concurrent requests per  
> connection for the same statement?
> 	1) we could just allow it
> 	2) we could return a non-cacheable preparedstatement
> 	3) throw an exception
>
> 2) Is it enough to cache prepared statements or should we cache  
> statements too?
>
> Note: this work is based completely on apache's dbcp statement  
> caching implementation and this will be noted in the final code.
>
> <statementcache.diff>
> <StatementPool.java>
> <CacheConnection.java>
> <CacheablePreparedStatement.java>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster




view thread (3+ messages)  latest in thread

Message-ID: <B5078593-14F0-49DA-B547-BB54979D6A59@fastcrypt.com>
Permalink:  ../B5078593-14F0-49DA-B547-BB54979D6A59@fastcrypt.com/
Also on:    postgresql.org/message-id/B5078593-14F0-49DA-B547-BB54979D6A59@fastcrypt.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg@fastcrypt.com
  Subject: Re: statement caching proof of concept redux
  In-Reply-To: <B5078593-14F0-49DA-B547-BB54979D6A59@fastcrypt.com>
  References: <4077BF73-482B-46C8-B65D-2E1FD2465294@fastcrypt.com> <B5078593-14F0-49DA-B547-BB54979D6A59@fastcrypt.com>

* 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