oracle_sql_processing

This is an old revision of the document!


The SQL processing like any other processing of code. It comes from a human and needs to go back to a human :) The problem is, through how many stops it will pass. Below you can see a basic representation on the possible wait times for any query:

This picture, clearly displays why it isn't ALWAYS A DATABASE FAULT :) Often the database is intermediary point between the User and the data.

Before we start speaking of SQL processing, we should discuss something very important and that is how ORACLE communicate and operate in general. Oracle kernel is using requests called “calls”. These “calls” represent request to certain structures and are generally devided into two groups:

DB Calls:

  • Parse
  • Execute
  • Fetch

Operation System (OS) Calls:

  • WAIT
  • STAT

These calls are accomplished using different functions:

SQL Processing is one of the biggest problems with any database because it is the hearth of performance tuning. In that chapter I will try to summarize, how Oracle processes an SQL. Firstly the statement has to be processed and there are several steps which should be executed. Below you can check a brief picture of Cursor Processing:

Parsing

  • Open Cursor
  • Syntax Check: If the query's is syntax is correct.
  • Semmantic Check: If you have the right to access the related objects.
  • Shared Pool check: If the plan isn't stored in the shared pool already.
  • Binding
  • *Optimization
  • *Row source generation

Execute

  • Execution

Fetching

  • Fetch results
  • Close Cursor

*-Optional steps in case of hard parse

  • oracle_sql_processing.1603092461.txt.gz
  • Last modified: 2020/10/19 07:27
  • by 86.49.253.137