cursor MOVE vs OFFSET in SELECT - Mailing list pgsql-general

From silly8888
Subject cursor MOVE vs OFFSET in SELECT
Date
Msg-id 3c8f9f940910260330l36a07bcbgc11a1264c5dd6750@mail.gmail.com
Whole thread Raw
Responses Re: cursor MOVE vs OFFSET in SELECT
List pgsql-general
Suppose that you have a query, say $sql_query, which is very
complicated and produces many rows. Which of the following is going to
be faser:

    $sql_query OFFSET 3000 LIMIT 12;

or

    BEGIN;
    DECLARE cur1 CURSOR FOR $sql_query;
    MOVE 3000 IN cur1;
    FETCH 12 FROM cur1;
    COMMIT;

Naturally, the former cannot be slower than the latter. So my question
essentially is whether the MOVE operation on a cursor is
(significantly) slower that a OFFSET on the SELECT.

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Can the string literal syntax for function definitions please be dropped ?
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: cursor MOVE vs OFFSET in SELECT