Re: [GENERAL] Implementing next 30 (or so) rows "sliding window"

2009-12-09 Thread Jaime Casanova
On Tue, Dec 8, 2009 at 3:51 PM, Scott Marlowe wrote: > On Tue, Dec 8, 2009 at 12:12 PM, Allan Kamau wrote: >> Hi, >> I did follow the basic advise and consulted the documentation for >> "SELECT" and came across "[ FETCH { FIRST | NEXT } [ count ] { ROW | >> ROWS } ONLY]" clause which seems to sat

Re: [GENERAL] Implementing next 30 (or so) rows "sliding window"

2009-12-08 Thread Scott Marlowe
On Tue, Dec 8, 2009 at 12:12 PM, Allan Kamau wrote: > Hi, > I did follow the basic advise and consulted the documentation for > "SELECT" and came across "[ FETCH { FIRST | NEXT } [ count ] { ROW | > ROWS } ONLY]" clause which seems to satisfy my requirement. This is a cursor, which is one of two

Re: [GENERAL] Implementing next 30 (or so) rows "sliding window"

2009-12-08 Thread Richard Broersma
On Tue, Dec 8, 2009 at 11:42 AM, Jaime Casanova wrote: > that's basically LIMIT, you have to combine that with OFFSET Keep in mind that offset begins to preform badly for large values. -- Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql

Re: [GENERAL] Implementing next 30 (or so) rows "sliding window"

2009-12-08 Thread Jaime Casanova
On Tue, Dec 8, 2009 at 2:12 PM, Allan Kamau wrote: > Hi, > I did follow the basic advise and consulted the documentation for > "SELECT" and came across "[ FETCH { FIRST | NEXT } [ count ] { ROW | > ROWS } ONLY]" clause which seems to satisfy my requirement. > that's basically LIMIT, you have to c

Re: [GENERAL] Implementing next 30 (or so) rows "sliding window"

2009-12-08 Thread Allan Kamau
Hi, I did follow the basic advise and consulted the documentation for "SELECT" and came across "[ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY]" clause which seems to satisfy my requirement. Allan. On Tue, Dec 8, 2009 at 9:49 PM, Allan Kamau wrote: > Hi, > I am looking for an efficient w

[GENERAL] Implementing next 30 (or so) rows "sliding window"

2009-12-08 Thread Allan Kamau
Hi, I am looking for an efficient way to implement a "sliding window" view of the data from a query. I am developing a simple website and would like to provide for viewing(fetching) only a predetermined maximum number of records per page. For example to view 100 records with "30" as the predetermin