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
|