From: Laurenz Albe <laurenz.albe@cybertec.at>
To: 黄宁 <huangning0722@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: cursor with hold must be save to disk?
Date: Fri, 14 Apr 2023 17:30:29 +0200
Message-ID: <2c62dd64316c1cf8b49bb4298603a73488e5d7be.camel@cybertec.at> (raw)
In-Reply-To: <CAKgrFs9Uq5FUMO6qQQDx0pPQyzkDqw-dGJc=VMupzuLbQ0b=jw@mail.gmail.com>
References: <CAKgrFs9Uq5FUMO6qQQDx0pPQyzkDqw-dGJc=VMupzuLbQ0b=jw@mail.gmail.com>
On Fri, 2023-04-14 at 19:04 +0800, 黄宁 wrote:
> i want to use cursor with hold ,but when I declare a curosr , it takes a long
> time to save the result set to disk. can i save the query state in memory?
> and fetch forward the next result.
The complete result set has to be materialized. It only spills to disk if it
is large. That cannot be avoided.
Yours,
Laurenz Albe
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-general@postgresql.org
Cc: laurenz.albe@cybertec.at, huangning0722@gmail.com
Subject: Re: cursor with hold must be save to disk?
In-Reply-To: <2c62dd64316c1cf8b49bb4298603a73488e5d7be.camel@cybertec.at>
References: <CAKgrFs9Uq5FUMO6qQQDx0pPQyzkDqw-dGJc=VMupzuLbQ0b=jw@mail.gmail.com> <2c62dd64316c1cf8b49bb4298603a73488e5d7be.camel@cybertec.at>
* 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