Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
oracle_sql_processing [2019/08/11 07:51] – andonovj | oracle_sql_processing [2020/10/19 07:29] (current) – 86.49.253.137 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Overview===== | =====Overview===== | ||
+ | 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. | ||
+ | |||
+ | =====Calls===== | ||
+ | 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 " | ||
+ | |||
+ | DB Calls: | ||
+ | * Parse | ||
+ | * Execute | ||
+ | * Fetch | ||
+ | |||
+ | Operation System (OS) Calls: | ||
+ | * WAIT | ||
+ | * STAT | ||
+ | |||
+ | These calls are accomplished using different functions: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | =====SQL Processing ===== | ||
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. | 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. | 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: | ||
- | Parse: | + | {{ :cursorparsing.jpg? |
+ | |||
+ | [[oracle_sql_processing_parse| Parsing]] | ||
* Open Cursor | * Open Cursor | ||
* Syntax Check | * Syntax Check | ||
* Semmantic Check | * Semmantic Check | ||
- | * Shared Pool check | + | * [[oracle_sql_processing_shared_pool_check| |
* Binding | * Binding | ||
* *Optimization | * *Optimization | ||
* *Row source generation | * *Row source generation | ||
- | Execute: | + | [[oracle_sql_processing_execute| |
* Execution | * Execution | ||
- | Fetch: | + | [[oracle_sql_processing_fetch| Fetching]] |
* Fetch results | * Fetch results | ||
* Close Cursor | * Close Cursor | ||
- | *-Optional steps in case of hard parse | + | *- Only when hard parse is needed |
- | + | ||
- | Below you can check a brief picture of Cursor Processing: | + | |
- | + | ||
- | {{ : | + | |
- | - [[oracle_sql_processing_parse| Parsing]] | ||
- | - [[oracle_sql_processing_execute| Execute]] | ||
- | - [[oracle_sql_processing_fetch| Fetching]] |