pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniele Bufarini <daniele.bufarini@ie-online.it>
To: pgsql-jdbc@postgresql.org
Subject: Problems with non scrollable cursors
Date: Fri, 21 Jan 2005 17:34:49 +0100
Message-ID: <41F12F29.5010602@ie-online.it> (raw)

Hi,
I'm developing a web application. I haveto know exactly how many pages I 
have and I have to allow the user to jump to a specific page( this is 
where I used limit and offset): I know that this solution is VERY slow 
and I tried to use cursors.... BUT (from PostgreSQL docs):
" The Statement must be created with a ResultSet type of 
ResultSet.TYPE_FORWARD_ONLY. This is the default, so no code will need 
to be rewritten to take advantage of this, but it also means that you 
cannot scroll backwards or otherwise jump around in the ResultSet." !!!
So I cannot, for example, use the ResultSet.absolute() to jump back in 
the result set!
Have you some ideas how to speed up that operations without using the 
LIMIT/OFFSET combo?
Thank you very much!


Daniele Bufarini



view thread (5+ messages)  latest in thread

Message-ID: <41F12F29.5010602@ie-online.it>
Permalink:  ../41F12F29.5010602@ie-online.it/
Also on:    postgresql.org/message-id/41F12F29.5010602@ie-online.it

 · 

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: daniele.bufarini@ie-online.it
  Subject: Re: Problems with non scrollable cursors
  In-Reply-To: <41F12F29.5010602@ie-online.it>
  References: <41F12F29.5010602@ie-online.it>

* 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