<<Back to PT Main Page Processing of SQL Statements By Oracle Database Engine As soon as the SQL query arrives to the database, Database engine starts preparing the SQL statement to execute. Oracle Processes a SQL statement in following 4 stages. Parsing Parsing of a SQL statement is, breaking down the SQL statements into executable version of code, for execution by database engine. In this stage oracle performs following task Cursor is created Syntax Check is performed Semantic Check is performed Security check is performed (Privileges on object/table) Hash value for SQL statement is generated (Hash Value = V$SQL.SQL_ID) Shared Pool Check for the generated hash value is done Based on the outcome of 5 either a soft parse or a Hard parse is done. Soft Parse: Once the Hash Value is generated, Database searches the Shared Pool for this Hash Value, If oracle finds the Hash Value in shared pool (also known as cache hit ) it just executes the a...
A Blog to share interesting Database Facts and Experience.