From: Stephen van Egmond <svanegmond@bang.dhs.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: sqllist <pgsql-sql@postgresql.org>
Cc: phpp <pgsql-php@postgresql.org>
Subject: Re: Re: [SQL] FTI, paged, ranked searching and efficiency.
Date: Wed, 15 Nov 2000 12:25:16 -0500
Message-ID: <20001115122516.B25685@bang.dhs.org> (raw)
In-Reply-To: <3A12C1DA.D296628C@agliodbs.com>
References: <3A36DC72@operamail.com>
<3A12C1DA.D296628C@agliodbs.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: svanegmond@bang.dhs.org, josh@agliodbs.com, pgsql-php@postgresql.org
Subject: Re: [SQL] FTI, paged, ranked searching and efficiency.
In-Reply-To: <20001115122516.B25685@bang.dhs.org>
References: <3A36DC72@operamail.com> <3A12C1DA.D296628C@agliodbs.com> <20001115122516.B25685@bang.dhs.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox