gpt4 book ai didi

oracle - 游标是否在内存中存储 SELECT 结果记录集?

转载 作者:行者123 更新时间:2023-12-02 06:16:16 27 4
gpt4 key购买 nike

我读过的一本书

Whenever you perform a SQL statement, the Oracle opens an area of memory in which the command is parsed and executed. This area is called a cursor.

它适用于显式和隐式游标。但我对另一件事很好奇 - 游标是否可以被视为 Oracle 返回最终记录集并将其用作获取记录的源的中间位置(在内存中)?

最佳答案

游标是指向从查询返回的中间数据集的指针。它包含用于生成和访问结果的状态信息。来自 Concepts Doc :

A cursor is a name or handle to a specific private SQL area. As shown in Figure 14-5, you can think of a cursor as a pointer on the client side and as a state on the server side.

查询的结果是一个结果集,由光标指向。它存储在内存或磁盘中的临时位置。来自 concepts doc :

A temporary tablespace contains schema objects only for the duration of a session. Locally managed temporary tablespaces have temporary files (temp files), which are special files designed to store data in hash, sort, and other operations. Temp files also store result set data when insufficient space exists in memory.

关于oracle - 游标是否在内存中存储 SELECT 结果记录集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12131191/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com