Difference between revisions of "SQL Process Flow"

From Robs_Wiki
Jump to: navigation, search
(Created page with "__TOC__ == Step 1 Statement is parsed == The user issues a statement and the statement is parsed by the database. When an application issues a SQL statement, the application...")
 
(Step 1 Statement is parsed)
Line 2: Line 2:
  
 
== Step 1 Statement is parsed ==
 
== Step 1 Statement is parsed ==
The user issues a statement and the statement is parsed by the database. When an application issues a SQL statement, the application makes a parse call to the database to prepare the statement for execution. The parse call opens or creates a cursor, which is a handle for the session-specific private SQL area that holds a parsed SQL statement and other processing information. The cursor and private SQL area are in the program global area (PGA).
+
The user issues a statement and the statement is parsed by the database. When an application issues a SQL statement, the application makes a parse call to the database to prepare the statement for execution. The parse call opens or creates a cursor, which is a handle for the session-specific private SQL area that holds a parsed SQL statement and other processing information. The cursor and private SQL area are in the program global area (PGA).<br />
 +
The parse call involves 3 steps:
 +
* syntax check (no errors in SQL statement)
 +
* semantics check (do the objects actually exist)
 +
* shared pool check (to determine if the statement is already in the shared pool so it can skip resource-intensive steps of statement processing)

Revision as of 22:28, 20 February 2020

Step 1 Statement is parsed

The user issues a statement and the statement is parsed by the database. When an application issues a SQL statement, the application makes a parse call to the database to prepare the statement for execution. The parse call opens or creates a cursor, which is a handle for the session-specific private SQL area that holds a parsed SQL statement and other processing information. The cursor and private SQL area are in the program global area (PGA).
The parse call involves 3 steps:

  • syntax check (no errors in SQL statement)
  • semantics check (do the objects actually exist)
  • shared pool check (to determine if the statement is already in the shared pool so it can skip resource-intensive steps of statement processing)