Re: Caching

From: snpe <snpe(at)snpe(dot)co(dot)yu>
To: "'psql'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Caching
Date: 2003-08-30 04:32:23
Message-ID: 200308301202.h7UC2Ojw002737@mx1.verat.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

What is server side prepared statement and how I used it in jdbc ?

Thanks
Haris Peco
On Friday 29 August 2003 09:35 pm, Fernando Nasser wrote:
> Yes, the current driver has setFetchSize() implemented.
>
> Note that you must be inside a transaction as a cursor is used for
> implementing this. Alternatively you can be using a server side prepared
> statement (you don't need to be inside a transaction in that case).
>
> If you are using an older driver, you can always declare a cursor yourself.
>
> Regards,
> Fernando
>
> Lufkin, Brad wrote:> Whenever I execute a query and retrieve the results
> with
>
> the sequence:
> > ResultSet resultSet = statement.executeQuery("SELECT blah blah
> > blah...");
> > while (resultSet.next()) {
> > //do something with the resultSet
> > }
> >
> > it looks like the query is completely carried out before any results are
> > returned. This contrasts with the behavior of other databases (Informix
> > comes to mind) where the query returns immediately and the results are
> > returned as the database fetches them. Is my supposition correct, and, if
> > so, is there any way to make postgres behave the same way as Informix?
> > My reasons for wanting this behavior is that I'm displaying results in
> > real time to a user through a GUI and the gradual display of results is
> > preferable to a long pause followed by all the results at once.
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/docs/faqs/FAQ.html

In response to

  • Re: Caching at 2003-08-29 21:35:14 from Fernando Nasser

Responses

  • Re: Caching at 2003-09-01 23:10:46 from Fernando Nasser

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Thomas 2003-08-30 09:12:31 Re: java_objects and create table
Previous Message Fernando Nasser 2003-08-29 21:35:14 Re: Caching