Re: Page Management

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "Samuel J(dot) Sutjiono" <ssutjiono(at)wc-group(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Page Management
Date: 2002-02-22 17:13:49
Message-ID: NEBBLAAHGLEEPCGOBHDGIEKNEGAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of Samuel J. Sutjiono
Sent: Friday, February 22, 2002 10:14 AM
To: pgsql-sql(at)postgresql(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Nielsen 2002-02-22 17:56:53 How do I return more than one value in a postgresql pl/pgsql procedure?
Previous Message Samuel J. Sutjiono 2002-02-22 17:04:38 Regular Expression for 'and' instead of 'or'