Understanding cursor (1): cursor Overview

Source: Internet
Author: User

Understanding cursors (1): An Overview of cursors eygle says that database activities are mainly about the importance of the cursors active cursors. As a result, I have made a series of articles, step-by-Step learning of cursors the first article is an overview. First, let's get A general idea: ① define www.2cto.com official definition: a cursor is a handle or name for A private SQL area that is: A cursor is the name of a private SQL area, but it does not actually exist. It is only composed of components in the private SQL area and is made up of every SQL statement in its life, before executing SQL statements in a private SQL zone, you must first open a cursor, that is, assign a private SQL zone. When the cursor is closed, the corresponding private SQL zone is released, or you can understand the cursor as the lifecycle of the SQL statement. In addition, hash_value is the reference point of the cursor. during the life of the SQL statement, this value will not change ② every cursor in the relevant memory zone (Private SQL zone). In the Library cache, there is an object corresponding to it and, the object name is the lock with lmode = 1 ③ soft resolution and soft resolution: soft-soft parse, it is to find the cached cursor in PGA, And the cursor directly corresponds to SQL _PLAN. It does not need to look for SQL soft parsing in the shared pool again: the cursor is not closed at all, re-bind & execute, so there is no need to search for SQL. www.2cto.com ④ related views [SQL] idle> select object_name from dba_objects where object_name like '% CURSOR % '; OBJECT_NAME comment V $ OPEN_CURSOR V $ SESSION_CURSOR_CACHE V $ SYSTEM_CURSOR_CACHE V $ SQL _CURSOR ⑤ parameters [SQL] idle> show parameter cursor NAME TYPE VALUE comment ------------- comment cursor_sharing string EXACT limit boolean open_cursors integer 300 session_cached_cursors integer 400

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.