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.
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.
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
Oracle Query execution
Questions by snehalberde
Related Answered Questions
Related Open Questions