Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
   
SQL Statement Parsing in Oracle




By Vigyan Kaushik
Jul 17, 2006

Digg! digg!     Print    email to friend Email to Friend

Note: This article was written for educational purpose only. Please refer to the related vendor documentation for detail.




Download Free Confio Software

SQL Statement Parsing in Oracle

Parsing of a SQL statement involves several steps. Blow is a flow diagram that will show you how this works. It also explains difference between soft and hard parse.

Step 1: Statement is submitted.

Step 2: Initial syntactic check is made. If there is an error statement returned to the client.

Step 3: Checks if statement open cursor for the statement, if yes then statement is executed if not, step 4 is performed.

Step 4: Checks if SESSION_CACHED_CURSORS initialization parameter is set and cursor is the Session Cursor cache. If yes then statement is executed if not, step 5 is performed.

Step 5: Checks if HOLD_CURSOR is set to Y. HOLD_CURSOR is an precompiler parameter that specifies that an individual cursor should be held open. If cursor in Held Cursor Cache then statement is executed if not, step 6 is performed.

Step 6: A cursor is opened. Statement is hashed and compared with the hashed value in the SQL area. If it found in SQL area then statement is executed and it is SOFT PARSE. If statement is not found then it statement is parsed and executed and it is called HARD PARSE

 

 



Comments/Reviews on this article:
Eswara  Prasad
Aug 10, 2006

I just need any Thumb Rule defined in oracle architecture for Syntactic checks in Parsing steps ?. if then could u please tell how it's done or any manual to read.

say:

select * from t1?
*
*
means error?

that is the table is not there.

Is there any thumb rule to say, it checks from left to right or right to left.

Kindly let me knowe?

vasu  
Jul 19, 2006

Great Article.

vikas  
Jul 25, 2006

Thanks for explaining this process.

 
About author:

Vigyan Kaushik is an Oracle certified professional serving IT industry for more than 10 years as an Oracle DBA and System Administrator. He has expertise in Database Designing, Administration, Networking, Tuning, Implementation, Maintenance with web deployment activities on different Unix flavors as well as on Windows Operating Systems.

 

Please login to post your comments





  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software