Re: [PHP] Re: FTI, paged, ranked searching and efficiency. - Mailing list pgsql-sql

From Stephen van Egmond
Subject Re: [PHP] Re: FTI, paged, ranked searching and efficiency.
Date
Msg-id 20001115122516.B25685@bang.dhs.org
Whole thread Raw
In response to Re: FTI, paged, ranked searching and efficiency.  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Josh Berkus (josh@agliodbs.com) wrote:
>     Unfortunately, your only real option I can see for DB server-side row
> grabbing is: Create the query(ies) as a temporary table or view using a
> function.  Then use Limit and Offset to grab one chunk of data at a
> time.  This is, of course, a serious problem for mutli-user performance
> since eash user would need their own temp table or view.

How come nobody's ever thought of cursors?

DECLARE foo CURSOR FOR SELECT stuff FROM stuff WHERE foo ORDER BY
something;

Hop forward N rows?
    MOVE FORWARD $n IN foo

Want M rows?
    FETCH FORWARD $m IN foo

/Steve


pgsql-sql by date:

Previous
From: Roberto Mello
Date:
Subject: Re: Persistent Connects (pg_pconnect)
Next
From: Stephen van Egmond
Date:
Subject: Re: [PHP] Re: FTI, paged, ranked searching and efficiency.