Re: setUseServerPrepare(true) and executeQuery(String)

From: Barry Lind <blind(at)xythos(dot)com>
To: Harald Krake <harald(at)krake(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: setUseServerPrepare(true) and executeQuery(String)
Date: 2002-12-01 08:43:04
Message-ID: 3DE9CB98.1000804@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Harald,

Why would you want to disable caching for standard jdbc statements
plans? In my application these are the ones that get reused the most,
and therefore benefit most from caching the plan on the server. If you
don't wan't to use a server side prepared and cached plan, then don't
enable it for your regular jdbc statement objects.

thanks,
--Barry

Harald Krake wrote:
> playing with the new server side prepared statements of 7.3 I discovered
> that _all_ statements will be prepared as server objects, not only
> the prepared ones. Depending on the application this might result in
> a permanently increasing number of server objects.
>
> In executeQuery(String), AbstractJdbc1Statement.java:141
> I would suggest the following modification:
>
> boolean old_useServerPrepare = m_useServerPrepare;
> m_useServerPrepare = false; // turn off for non-prepared statements
> java.sql.ResultSet rs = executeQuery();
> m_useServerPrepare = old_useServerPrepare;
> return rs;
>
> regards,
> Harald.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2002-12-01 08:58:30 Re: setDefault()
Previous Message Nic Ferrier 2002-11-30 22:16:19 Re: streaming result sets: progress