From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Thomas Finneid <tfinneid(at)fcon(dot)no> |
Cc: | John Lister <john(dot)lister(at)kickstone(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: pooled prepared statements |
Date: | 2009-05-13 22:31:03 |
Message-ID: | 491f66a50905131531x774b2a3ds7813b075562cd83f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I still think you will have multiple prepared statements one per connection
regardless of if it uses a procedure, and you would have to prepare the
statement on first use and then store it in the session.
Dave
On Wed, May 13, 2009 at 3:52 PM, Thomas Finneid <tfinneid(at)fcon(dot)no> wrote:
>
> Maybe your right. The query processing takes from 1-10 seconds, so planning
> it is not a big factor. But when the load becomes higher, as it will be as
> the data increases, the planning might possibly eat time which could be used
> elsewhere.
>
> My server, as it is now, is pushing the limits of postgres for my use, so
> maybe I need to reclaim as much of wasted time as possible...
>
> We'll see.
>
> thomas
>
> Dave Cramer wrote:
>
>
>>
>> On Wed, May 13, 2009 at 10:37 AM, John Lister <john(dot)lister(at)kickstone(dot)com<mailto:
>> john(dot)lister(at)kickstone(dot)com>> wrote:
>>
>> 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.
>>
>>
>> While the function may be compiled, the overhead is the same for preparing
>> the statement inside the function. So I don't think it's a huge win.
>>
>>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tanel | 2009-05-14 09:10:45 | ResultSet getString() result differs in 8.3 jdbc (compared to 8.1), with "real" type |
Previous Message | Thomas Finneid | 2009-05-13 19:52:03 | Re: pooled prepared statements |