Re: [SQL] OFFSET impact on Performance??? - Mailing list pgsql-performance

From Greg Stark
Subject Re: [SQL] OFFSET impact on Performance???
Date
Msg-id 87y8eh1hy9.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: [SQL] OFFSET impact on Performance???  (Alex Turner <armtuk@gmail.com>)
List pgsql-performance
Alex Turner <armtuk@gmail.com> writes:

> I am also very interesting in this very question.. Is there any way to
> declare a persistant cursor that remains open between pg sessions?
> This would be better than a temp table because you would not have to
> do the initial select and insert into a fresh table and incur those IO
> costs, which are often very heavy, and the reason why one would want
> to use a cursor.

TANSTAAFL. How would such a persistent cursor be implemented if not by
building a temporary table somewhere behind the scenes?

There could be some advantage if the data were stored in a temporary table
marked as not having to be WAL logged. Instead it could be automatically
cleared on every database start.

--
greg

pgsql-performance by date:

Previous
From: Mitch Pirtle
Date:
Subject: PG versus FreeBSD, startup and connections problems
Next
From: Litao Wu
Date:
Subject: Re: reltuples after vacuum and analyze