Tuesday, June 15, 2010

Oracle SQL Parsing Steps Involved

Oracle SQL is parsed before execution, and a hard parse includes these steps:

1.        Loading into shared pool - The SQL source code is loaded into RAM for parsing. (the "hard" parse step)

2.        Syntax parse - Oracle parses the syntax to check for misspelled SQL keywords.

3.        Semantic parse - Oracle verifies all table & column names from the dictionary and checks to see if you are authorized to see the data.

4.        Query Transformation - If enabled (query_rewrite=true), Oracle will transform complex SQL into simpler, equivalent forms and replace aggregations with materialized views, as appropriate.

5.        Optimization - Oracle then creates an execution plan, based on your schema statistics (or maybe with statistics from dynamic sampling in 10g).

6.        Create executable - Oracle builds an executable file with native file calls to service the SQL query.



Post a Comment


ORA-BLOG. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com