From: Gerhard H. <gh...@gh...> - 2004-11-11 09:19:25
|
On Sun, Nov 07, 2004 at 09:41:50AM -0800, Uzo Uzo wrote: > I return a set of results, which I break into multiple pages. This > is how I have implemented, but I feel that it is too expensive in > terms of execution. Is there anyway to tell PgSQL to start fetching > from a particular number?=20 > =20 > c.execute(Query) > c.fetchmany( (pagenum-1)*NumPerPage) # skip previous results > c.fetchmany(NumPerPage) # fetch for page Looks like you want the LIMIT and OFFSET parameters for SELECT. http://www.postgresql.org/docs/current/interactive/sql-select.html -- Gerhard --=20 A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? |