Database Reference
In-Depth Information
a slight but important difference. Independently of how many rows the query returns, the first block doesn't generate
an exception. Instead, the second block generates an exception if zero or several rows are returned.
How Parsing Works
The previous section describes the life cycle of cursors, and this section focuses on the parse phase. The steps carried
out during this phase, as shown in Figure 2-3 , are the following:
1.
Include VPD predicates : If Virtual Private Database (VPD, formerly known as row-level
security) is in use and active for one of the tables referenced in the parsed SQL statement,
the predicates generated by the security policies are included in its WHERE clause.
2.
Check syntax, semantics, and access rights : This step makes sure not only that the SQL
statement is correctly written but also that all objects referenced by the SQL statement
exist and the user parsing it has the necessary privileges to access them.
3.
Store parent cursor in a shared SQL area : Whenever a shareable parent cursor isn't yet
available, some memory is allocated from the library cache, and a new parent cursor is
stored inside it.
4.
Generate execution plan : During this phase, the query optimizer produces an execution
plan for the parsed SQL statement. (This topic is fully described in Chapter 6.)
5.
Store child cursor in a shared SQL area : Some memory is allocated, and the shareable child
cursor is stored inside it and associated with its parent cursor.
 
Search WWH ::




Custom Search