Re: pooled prepared statements - Mailing list pgsql-jdbc

From John Lister
Subject Re: pooled prepared statements
Date
Msg-id 03C41048CEFD45DD97AC0DD884C8A21A@squarepi.com
Whole thread Raw
In response to pooled prepared statements  (Thomas Finneid <tfinneid@fcon.no>)
Responses Re: pooled prepared statements  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
>>> Probably easier to create a server side function instead, then.
>> But wouldn't you still have to go through all the planning steps within
>> the function for any queries, although i'll admit i'm not familiar with
>> Postgresql functions.
>
> Server-side functions are compiled when installed. Since my function would
> only contain simple queries that are parameterized, it would pre-compile
> well.

It was the simpler queries I was thinking of and the overhead in the
planning(preparing) stage compared with fetching the results rather than any
complexity around them For example fetching session data using a session_id
on a web server which is done many times over..

Although i'm not sure how much overhead there is in the planning stages
compared with actually fetching the data and if the tradeoff of complexity
is worth it...

JOHN


pgsql-jdbc by date:

Previous
From: dmp
Date:
Subject: Re: Unable to access table named "user"
Next
From: "Vernon"
Date:
Subject: [Fwd: Re: Enums - from java to jpa]