Oracle Query execution

What is the actual processing being done at backend or server side to retrive the data or complete the DML operation.

Questions by snehalberde

Showing Answers 1 - 10 of 10 Answers

Velavan

  • Jul 23rd, 2011
 

All SQL statements have to go through the following stages of execution:
1) PARSE: Every SQL statement has to be parsed which includes checking the syntax, validating, ensuring that all references to objects are correct and ensuring that relevant privileges to those object exist.
2) BIND: After parsing, the oracle server knows the meaning of the oracle statement but still may not have enough info(values for variables) to execute the statement. The process of obtaining these value is called as bind values.
3) EXECUTE: After binding, the Oracle server executes the statement.
4) FETCH: In the fetch stage, rows are selected and ordered and each successive row retrieves another row of the result until the last row has been fetched. This stage is only for certain DML statements like SELECT.

Prasanta Kumar Behera`

  • Aug 9th, 2011
 

All SQL statements have to go through the following stages of execution:

1) PARSE: Every SQL statement has to be parsed which includes checking the syntax, validating, ensuring that all references to objects are correct and ensuring that relevant privileges to those object exist.

2) BIND: After parsing, the oracle server knows the meaning of the oracle statement but still may not have enough info(values for variables) to execute the statement. The process of obtaining these value is called as bind values.

3) EXECUTE: After binding, the Oracle server executes the statement.

4) FETCH: In the fetch stage, rows are selected and ordered and each successive row retrieves another row of the result until the last row has been fetched. This stage is only for certain DML statements like SELECT.

  Was this answer useful?  Yes

Sachin Garg

  • May 22nd, 2012
 

Hi Friends, When we pass a SELECT query it executes under some phases. That includes

1) Checking by Server Process - Which type of Query is this - Sql or Pl/sql.
2) If sql - server process puts the code in sql area available under library cache under shared pool.
3) If pl/sql - server process puts the sql code in sql area and pl code in pl area available under library cache area under shared pool.
4) Now Parsing (Syntax, Privileges on user passing the query checks)
5) Check if execution plan is already available or not.
6) if not creates a execution plan on behalf of available statistics, if yes, uses available execution plan.
7) checks if the data blocks contains required data are available in buffer cache or not.
8) if yes, server process pick the data from BC and return to the user. If not server process reads the data blocks from data files and put the data blocks into buffer cache and return to the user.

  Was this answer useful?  Yes

KSPradeep Rayavarapu

  • Jan 28th, 2013
 

The order of Query Execution is following
1)From Clause
2)Where Clause
3)Group By Clause
4)Having Clause
5)Select
6)Order By Clause

  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions