Problems with non scrollable cursors - Mailing list pgsql-jdbc

From Daniele Bufarini
Subject Problems with non scrollable cursors
Date
Msg-id 41F12F29.5010602@ie-online.it
Whole thread Raw
Responses Re: Problems with non scrollable cursors
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: context classloader
Next
From: "Ing. Jhon Carrillo"
Date:
Subject: Schema?