Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 75770 invoked from network); 12 May 2006 06:05:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 May 2006 06:05:02 -0000 Received: (qmail 16745 invoked by uid 500); 12 May 2006 06:04:58 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 16669 invoked by uid 500); 12 May 2006 06:04:56 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 16605 invoked by uid 99); 12 May 2006 06:04:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2006 23:04:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [193.72.144.2] (HELO mail.elca.ch) (193.72.144.2) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2006 23:04:53 -0700 Received: from exchange.elca.ch (unverified) by mail.elca.ch (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Fri, 12 May 2006 08:04:30 +0200 Received: by exchange.elca.ch with Internet Mail Service (5.5.2653.19) id ; Fri, 12 May 2006 08:04:30 +0200 Message-ID: From: Brocard Antoine To: "'user-java@ibatis.apache.org'" Subject: How to avoid fetching all rows when accessign a page in a Paginat edList Date: Fri, 12 May 2006 08:04:29 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi all, I have the following problem: I have a table in the database that contains about 26'000 rows. I would like to display it using pagination. So I decided to use SqlMapExecutor.executeQueryForPaginatedList(...). The paging works fine, but when I try to access pages (with the gotoPage(n) method) that are pretty far from 0 (~1000), it takes a lot of time. I suspect iBatis to fetch all the row from 0 to my page. Is there a way to improve this? I use Oracle that has the ROW_NUM property associated to each row. Is there a way to modify my sql statement so that it receives the "asked" page somehow and can maybe return only the interesting rows? Thank you very much for your answer Best regards Antoine Antoine Brocard / Consultant ELCA / www.elca.ch Av. de la Harpe 22-24 / Case postale 519 / CH - 1001 Lausanne mailto:antoine.brocard@elca.ch / Tel: +41 21 613 21 11 / Fax: +41 21 613 21 00 This message may contain confidential and/or privileged information. If you are neither the addressee nor authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please contact the sender and delete this message. Thank you. Antoine Brocard / Consultant ELCA / www.elca.ch Av. de la Harpe 22-24 / Case postale 519 / CH - 1001 Lausanne mailto:antoine.brocard@elca.ch / Tel: +41 21 613 21 11 / Fax: +41 21 613 21 00 This message may contain confidential and/or privileged information. If you are neither the addressee nor authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please contact the sender and delete this message. Thank you.