GeekInterview.com
Series: Subject: Topic:
Question: 1 of 85

Flow in Oracle Database.

What happens when a query is submitted in oracle? Please give the complete flow as to which all processes act and how the data is submitted / retrieved to / from the database .
Asked by: Bharatsubnis | Member Since Apr-2012 | Asked on: Apr 13th, 2012

View all questions by Bharatsubnis

Showing Answers 1 - 2 of 2 Answers
Chittaranjan Kotian

Answered On : May 16th, 2012

A query is first checked for semantics, and is then parsed. Parse can be hard parse or soft parse. Oracle will check if the parsed statement exists in the library cache. If it exists the existing statement is used, If not, the query statement will be hard parsed and placed in the library cache. The optimized then decides on the best execution plan and executes the statement. The data to be retrieved is fetched from the buffer cache if it already exists, if not the data blocks are read, data fetched and stored in the buffer cache and presented to the session requesting the data

  
Login to rate this answer.
himanshu

Answered On : Sep 27th, 2012

1. RDBMS checks if a copy of the parsed SQL statement exists in the library cache. If parsed copy exists, then steps 2 to 6 are skipped.
2. RDBMS validates the syntax of the statement.
3. RDBMS ensures that all the columns and tables referenced in the statement exist.
4. RDBMS acquires parse locks on objects referenced in the statement so that their definitions do not change while statement is parsed.
5. RDBMS ensures that the user has sufficient privileges.
6. Statement is parsed and execution plan is created.
7. Statement is executed.
8. Values are fetched.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.