Problems with non scrollable cursors

From: Daniele Bufarini <daniele(dot)bufarini(at)ie-online(dot)it>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Problems with non scrollable cursors
Date: 2005-01-21 16:34:49
Message-ID: 41F12F29.5010602@ie-online.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ing. Jhon Carrillo 2005-01-21 17:58:11 Schema?
Previous Message Kris Jurka 2005-01-21 15:57:58 Re: context classloader