You are on page 1of 1

Steps necessary for statement processing

• Step 1: Create a Cursor


• Step 2: Parse the statement
• Step 3: Describe Query Results
• Step 4: Define Query output
• Step 5: Bind Variables
• Step 6: Parallelise the Statement
• Step 7: Execute the statement
• Step 8: Fetch rows of a Query
• Step 9: Close the Cursor

Create Cursor
• A Cursor is a handle or name for a
private SQL area
• Contains information for statement
processing
• Created by a program interface call in
expectation of a SQL statement
• Cursor structure is independent of the
SQL statement that it will contain

Shared Cursors
Shared cursor information is stored in the
library cache. This includes:
• Parse tree for statement
• Execution plan
• Bind variable descriptions
• Object definitions (table columns)
• Statement type
• PL/SQL objects also store additional data

Library Cache Function


• Promotes sharing of SQL between
users
• Provides quick access to statements
in memory via hashing system
• Potential problems:
– Hashing algorithm must spread
statements evenly
– Large version counts can mean
excessive time looking for the
statement in the library cache

You might also like