[HACKERS] Alternative to LIMIT in SELECT ?

Marc Howard Zuckman <marc@fallon.classyad.com>

From: Marc Howard Zuckman <marc@fallon.classyad.com>
To: Eric Lee Green <eric@linux-hw.com>
Cc: "Marc G. Fournier" <scrappy@hub.org>, Jeff Hoffmann <jeff@remapcorp.com>, PostgreSQL-development <hackers@postgreSQL.org>
Date: 1998-10-13T23:27:04Z
Lists: pgsql-hackers
I can't speak to the relative efficiencies of the methods, but I do
perform queries that present data subsets to web browsers using postgresql
with the following method:

	1) collect data input; do cgi query; write tuples to temporary file
	2) html page index sent back to browser contains page specific
		references to temporary file name and tuple range.
	3) Subsequent data retrievals reference temporary file using sed and
		tuple range
	4) temporary file is destroyed 15min after last access time by a
		background process.
This consumes disk space, but I assume it conserves memory compared to
a cursor/fetch sequence performed in a persistent db connection.

For a general purpose query, I'm not sure if there is any other
alternative to this method unless you wish to reperform the query
for each retrieved html page.

Marc Zuckman
marc@fallon.classyad.com

_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
_     Visit The Home and Condo MarketPlace		      _
_          http://www.ClassyAd.com			      _
_							      _
_  FREE basic property listings/advertisements and searches.  _
_							      _
_  Try our premium, yet inexpensive services for a real	      _
_   selling or buying edge!				      _
_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_