Saturday 8 September 2018

How Select statement get processes in a oracle Database


Basic Diagram

Steps:

High Level: Parse (Check syntax, semantics and privileges )
                    Execution Plan
                    Fetch

  1. Listener established a connection with App Server 
  2. A server process get created  by PGA for App server 
  3. Server process act as a proxy between App and DB , it create a HASH Value for corresponding SQL and sent the details to SGA 
    1. if same sql is ran earlier there would be a sql area exist if not then a sql area will be get created 
    2. SQL engine inside SGA will parse the sql based on syntax, semantics and privileges
    3. Optimizer will create the execution plan 
    4.  SP process will read the data files  by making I/O and bring it to buffer cache
    5.  if data is already present in buffer cache , no I/O occur
  4. SP will deliver the data to App server 



Useful link
https://docs.oracle.com/database/121/TGDBA/tune_pga.htm#TGDBA363

No comments:

Post a Comment