Steps executed during SQL statement processing

Explain the steps executed during SQL statement processing.

The parser scans the statement and breaks it into logical units such as keywords, identifiers and operators.

- A query or a sequence tree is built using the units above. This is done to transform the source data into the format required by the result set.

- The Query optimizer analyzes the fastest way to access the source tables using minimum resources. The final optimized version of the updated query tree is called as execution plan.

- Now, the relational engine starts to execute this plan. the relational engine requests that the storage engine pass up data from the row sets requested from the relational engine.

- In turn, the relational engine processes this data into the format as desired by result set and returns the same.

Explain the steps executed during SQL statement processing.

Steps in Processing SQL Statements

Prepare statement
Define an application request
Bind placeholders
For DML statements and queries with input variables, perform one or more bind calls to bind the address of each input variable array to each placeholder in the statement.
Execute statement
Describe select-list items
Define output variables
For queries, perform one or more define calls to define an output variable for each select-list item in the SQL statement
Fetch and process data
Steps executed during a typical transaction
A transaction contains one or more SQL statements, It is an atomic unit...
What are transaction isolation levels?
What are transaction isolation levels? - If row locks are obtained by a certain transaction, then any other transaction that contains DML needs to wait......
What are the uses of Rollback Segment?
What are the uses of Rollback Segment? - Rollback segments undo changes when a transaction is rolled back ....
Post your comment