X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 931283A4B1D for ; Fri, 21 Jan 2005 16:33:26 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46660-06 for ; Fri, 21 Jan 2005 16:33:13 +0000 (GMT) Received: from relay.ie-online.it (mercurio.ie-online.it [193.27.202.38]) by svr1.postgresql.org (Postfix) with ESMTP id 7999C3A4BC6 for ; Fri, 21 Jan 2005 16:32:31 +0000 (GMT) Received: from [192.168.0.95] (unknown [192.168.0.95]) by relay.ie-online.it (Postfix) with ESMTP id C98DF48E046 for ; Fri, 21 Jan 2005 17:32:29 +0100 (CET) Message-ID: <41F12F29.5010602@ie-online.it> Date: Fri, 21 Jan 2005 17:34:49 +0100 From: Daniele Bufarini User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050103 X-Accept-Language: en-us, en, it MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Problems with non scrollable cursors Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.16; VAE: 6.29.0.5; VDF: 6.29.0.52; host: relay.ie-online.it) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/207 X-Sequence-Number: 12087 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