Re: Page Management - Mailing list pgsql-sql

From Nick Fankhauser
Subject Re: Page Management
Date
Msg-id NEBBLAAHGLEEPCGOBHDGIEKNEGAA.nickf@ontko.com
Whole thread Raw
In response to Page Management  ("Samuel J. Sutjiono" <ssutjiono@wc-group.com>)
List pgsql-sql
Sam-
 
The answers probably vary a lot depending on the tools you're using to get the info to the web. We use JDBC+Servlets, and our approach to this is to limit the queries to 1000, and then just keep the whole ResultSet and page through it in our servlet without hitting the database again.
 
-NickF
 
-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Samuel J. Sutjiono
Sent: Friday, February 22, 2002 10:14 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Page Management

Hello,
 
I have a question on page management. I want my web page to display the first 10 rows (of 100 in the result set).  If user clicks next page, it executes the same SQL (in Stored Procedure) and displays records 11-20.  What is the most efficient way to accomplish this ?   Should I use LIMIT and OFFSET or Fetch from cursor ?
 
I appreciate any help.
 
Regards,
Sam

pgsql-sql by date:

Previous
From: "Samuel J. Sutjiono"
Date:
Subject: Regular Expression for 'and' instead of 'or'
Next
From: Oliver Elphick
Date:
Subject: Re: How does Index Scan get used