SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Oracle	
  Query	
  Optimizer	
  
Hyderabad	
  –	
  30th	
  May	
  2015	
  
About	
  me…	
  
Vivek	
  Sharma,	
  
Blog	
  url	
  :	
  h3p://viveklsharma.wordpress.com	
  
Email	
  :	
  vlsharma@hotmail.com	
  
A	
  Regular	
  Speaker	
  for	
  AIOUG	
  	
  
Speaker	
  of	
  the	
  Year	
  –	
  Sangam	
  2012	
  
•  Cursors	
  
•  SelecMvity	
  
•  Cardinality	
  
Key	
  Concepts…	
  
•  Cursors	
  
•  SelecMvity	
  
•  Cardinality	
  
Key	
  Concepts…	
  
Client	
  /	
  
Applica-on	
  
Handle	
  
Server	
  Process	
  
	
  Memory	
  
Private	
  SQL	
  Area	
  
SGA	
  
Library	
  Cache	
  
Shared	
  SQL	
  Area	
  
Syntax	
  /	
  Seman-cs	
  Checks	
  
Sharable	
  Parent	
  
Cursor	
  Available	
  ?	
  
Execute	
  
Store	
  Parent	
  Cursor	
  in	
  
Library	
  Cache	
  
Query	
  Transforma-on	
  /	
  
Execu-on	
  Plans	
  
Store	
  child	
  Cursor	
  in	
  Library	
  
Cache	
  
Sharable	
  Child	
  
Cursor	
  Available	
  ?	
  
N	
  
N	
  
Y	
  
Y	
  
Life	
  4me	
  of	
  a	
  Cursor…	
  
Syntax	
  /	
  Seman-cs	
  Checks	
  
Sharable	
  Parent	
  
Cursor	
  Available	
  ?	
  
Execute	
  
Store	
  Parent	
  Cursor	
  in	
  
Library	
  Cache	
  
Query	
  Transforma-on	
  /	
  
Execu-on	
  Plans	
  
Store	
  child	
  Cursor	
  in	
  Library	
  
Cache	
  
Sharable	
  Child	
  
Cursor	
  Available	
  ?	
  
N	
  
N	
  
Y	
  
Y	
  
Life	
  4me	
  of	
  a	
  Cursor…	
  
•  Cursors	
  
•  SelecMvity	
  
•  Cardinality	
  
Key	
  Concepts…	
  
ü  Value	
  between	
  0	
  and	
  1	
  
ü  Represents	
  FracMon	
  or	
  %age	
  of	
  rows	
  filtered	
  
ü  Drives	
  the	
  Access	
  Path	
  
ü  With	
  no-­‐histograms,	
  it	
  is	
  Density	
  or	
  1/Num_DisMnct	
  
ü  Close	
  to	
  0	
  –	
  Low	
  /	
  	
  Close	
  to	
  1	
  -­‐	
  High	
  
•  Cursors	
  
•  SelecMvity	
  
•  Cardinality	
  
Key	
  Concepts…	
  
ü  Number	
  of	
  rows	
  returned	
  by	
  an	
  OperaMon	
  
ü  Drives	
  Access	
  Order	
  
ü  SelecMvity	
  *	
  Num_Rows	
  
Introduc4on	
  to	
  Query	
  Op4mizer…	
  
SQL	
  
Query	
  
OpMmizer	
  
Object	
  StaMsMcs	
  
System	
  StaMsMcs	
  
Database	
  Design	
  
Fixed	
  Plans	
  
ExecuMon	
  Environment	
  
Bind	
  Variables	
  
Dynamic	
  Sampling	
  
Cardinality	
  Feedback	
  
ExecuMon	
  
Plan	
  
Object	
  Sta4s4cs…	
  
•  Table	
  StaMsMcs	
  	
  
o  num_rows	
  
o  Blocks	
  
•  Index	
  StaMsMcs	
  	
  
o  blevel	
  
o  leaf_blocks	
  
o  clustering_factor	
  	
  
•  Column	
  StaMsMcs	
  	
  
o  num_disMnct	
  
o  num_nulls	
  
o  density	
  (1/num_disMnct)	
  
o  low_value	
  
o  high_value	
  
•  ParMMon	
  Level	
  StaMsMcs	
  
o  Single	
  ParMMon	
  Scan	
  
•  Global	
  StaMsMcs	
  (Table	
  Level)	
  
o  All	
  or	
  MulMple	
  ParMMons	
  Scan	
  
•  Histograms	
  
o  Frequency	
  Based	
  
o  Height	
  Balanced	
  
o  Top	
  Frequency	
  
o  Hybrid	
  
With	
  Frequency	
  1/(2*num_rows)	
  
Object	
  Sta4s4cs	
  (Cardinality	
  -­‐	
  No	
  Nulls)…	
  
Statistics Values
Num_rows 1000
Num_distinct 10 (low 1 and high 10)
Blocks 39
Predicate ORG_ID 1
Density (org_id) 0.1 (No Nulls)
SQL> select id, name from aioug where org_id = 1;
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------
Plan hash value: 1667281916
---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 100 | 1800 | 12 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| AIOUG | 100 | 1800 | 12 (0)| 00:00:01 |
---------------------------------------------------------------------------
Statistics Values
Num_rows 1000
Num_distinct 10 (low 1 and high 10)
Blocks 39
Density (org_id) 0.1 (No Nulls)
Base Selectivity 0.1 * ((1000-0)/1000) = 0.1
Cardinality 0.1 * 1000 = 100
Object	
  Sta4s4cs	
  (Cardinality	
  -­‐	
  No	
  Nulls)…	
  
Object	
  Sta4s4cs	
  (Cardinality	
  Few	
  Nulls)…	
  
Statistics Values
Num_rows 1000
Num_distinct 10 (low 1 and high 10)
Blocks 39
Predicate ORG_ID_N 1
Density (org_id_n) 0.1 (100 Nulls)
SQL> select id, name from aioug where org_id_n = 1;
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------
Plan hash value: 1667281916
---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 90 | 1620 | 12 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| AIOUG | 90 | 1620 | 12 (0)| 00:00:01 |
---------------------------------------------------------------------------
Object	
  Sta4s4cs	
  (Cardinality	
  Few	
  Nulls)…	
  
Statistics Values
Num_rows 1000
Num_distinct 10 (low 1 and high 10)
Blocks 39
Density (org_id_n) 0.1 (100 Nulls)
Base Selectivity 0.1 * ((1000-100)/1000) = 0.09
Cardinality 0.09 * 1000 = 90
Out	
  of	
  Bound	
  (Cardinality	
  -­‐	
  No	
  Nulls)…	
  
Statistics Values
Num_rows 1000
Num_distinct 10 (low 1 and high 10)
Blocks 39
Predicate ORG_ID 14
Density (org_id) 0.1 (No Nulls)
SQL> select id, name from aioug where org_id = 14;
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------
Plan hash value: 1667281916
---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 56 | 1008 | 11 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| AIOUG | 56 | 1008 | 11 (0)| 00:00:01 |
---------------------------------------------------------------------------
Statistics Values
Num_rows 1000
Num_distinct 10 (low 1 and high 10)
Blocks 39
Density (org_id) 0.1 (No Nulls)
Base Selectivity 0.1 * ((1000-0)/1000) = 0.1
Required Value (org_id) 14
Out of Bound Factor ((14-10)/(10-1)) = 0.44444
Cardinality (0.1 * 1000) –
(0.1*1000*0.4444) = 56
Out	
  of	
  Bound	
  (Cardinality	
  -­‐	
  No	
  Nulls)…	
  
•  utl_raw.cast_to_*	
  	
  
•  dbms_stats.convert_raw_value	
  
Low	
  &	
  High	
  Value	
  (Deciphering)…	
  
select column_name, low_value, high_value from dba_tab_columns
where owner='SCOTT' and table_name='AIOUG' order by 1;
COLUMN_NAME LOW_VALUE HIGH_VALUE
-------------------- ----------------------- -----------------------
ID C102 C20B
NAME 41477349586C68677566 7A7073484A505A44544F
ORG_ID C102 C10B
ORG_ID_N C102 C10B
Object	
  Sta4s4cs…	
  
•  Table	
  StaMsMcs	
  	
  
o  num_rows	
  
o  Blocks	
  
•  Index	
  StaMsMcs	
  	
  
o  blevel	
  
o  leaf_blocks	
  
o  clustering_factor	
  	
  
•  Column	
  StaMsMcs	
  	
  
o  num_disMnct	
  
o  num_nulls	
  
o  density	
  (1/num_disMnct)	
  
o  low_value	
  
o  high_value	
  
•  ParMMon	
  Level	
  StaMsMcs	
  
o  Single	
  ParMMon	
  Scan	
  
•  Global	
  StaMsMcs	
  (Table	
  Level)	
  
o  All	
  or	
  MulMple	
  ParMMons	
  Scan	
  
•  Histograms	
  
o  Frequency	
  Based	
  
o  Height	
  Based	
  
o  Top	
  Frequency	
  
o  Hybrid	
  (12c)	
  
With	
  Frequency	
  1/(2*num_rows)	
  
Index	
  Sta4s4cs	
  (low	
  Clustering	
  Factor)…	
  
Statistics
Indexed Column ORG_ID ORG_ID_M
Num_rows 1000 1000
Blevel 1 1
Leaf_Blocks 2 2
Clustering_Factor 34 337
SQL> select id, name from aioug where org_id = 1;
Plan hash value: 1442557996
-------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)|
-------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 100 | 5 (0)|
| 1 | TABLE ACCESS BY INDEX ROWID BATCHED| AIOUG | 100 | 5 (0)|
| 2 | INDEX RANGE SCAN | AIOUG_ORG_ID_IDX | 100 | 1 (0)|
-------------------------------------------------------------------------------------
Index	
  Sta4s4cs	
  (High	
  Clustering	
  Factor)…	
  
SQL> select id, name from aioug where org_id_m = 1;
Plan hash value: 1667281916
--------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)|
--------------------------------------------------------
| 0 | SELECT STATEMENT | | 100 | 12 (9)|
| 1 | TABLE ACCESS FULL| AIOUG | 100 | 12 (9)|
--------------------------------------------------------
Statistics
Indexed Column ORG_ID ORG_ID_M
Num_rows 1000 1000
Blevel 1 1
Leaf_Blocks 2 2
Clustering_Factor 34 337
Cost = blevel
+ ceil(leaf_blocks * index_selectivity)
+ ceil(clustering_factor * table_selectivity)
Cost	
  of	
  an	
  Index	
  Scan	
  
Cost	
  of	
  a	
  Table	
  Scan	
  via	
  Index	
  
CalculaMon	
  of	
  CF	
  (10	
  Row	
  3	
  Block	
  Table	
  with	
  an	
  Index)	
  
Index Entry Table Block CF
A 1 1
A 1 1
A 2 2
B 3 3
B 1 4
C 3 5
C 2 6
C 2 6
D 1 7
D 3 8
Good	
  :	
  Near	
  to	
  Table.blocks	
  
Bad	
  :	
  Near	
  to	
  Table.num_rows	
  
Index	
  Sta4s4cs	
  (Clustering	
  Factor)…	
  
•  SREADTIM	
  	
  
•  MREADTIM	
  
•  MBRC	
  
•  CPUSPEED	
  
•  IOSEEKTIM	
  
•  IOTRFSPEED	
  
•  CPUSPEEDNW	
  
System	
  Sta4s4cs…	
  
Workload	
  StaMsMcs	
  
NoWorkload	
  StaMsMcs	
  
System	
  Sta4s4cs	
  (workload)…	
  
select pname, pval1
from sys.aux_stats$;
PNAME PVAL1
-------------------- ----------
SREADTIM 2
MREADTIM 5
CPUSPEED 500
MBRC 10
MAXTHR
SLAVETHR
Cost	
  =	
  IO_Cost	
  +	
  CPU	
  Cost	
  
IO_Cost	
  =	
  ceil(#Blks/MBRC	
  *	
  Mread-m/Sread-m)	
  
CPU	
  Cost	
  =	
  ceil(CPUSpeed	
  /	
  (CPUCycles	
  *	
  Sread-m)	
  
+	
  _tablescan_cost_plus_one	
  
System	
  Sta4s4cs	
  (workload)…	
  
Statistics Values
Blocks 39
MBRC 10
Mreadtim / Sreadtim 5 / 2
SQL> select id, name from aioug where org_id = 1;
SQL> select operation, io_cost, cpu_cost, cost from plan_table
2 where operation='TABLE ACCESS';
OPERATION IO_COST CPU_COST COST
------------------------------ ---------- ---------- ----------
TABLE ACCESS 11 501736 12
SQL> select ceil(39/10*5/2), 1 "_table_scan_cost_plus_one" from dual;
CEIL(39/10*5/2) _table_scan_cost_plus_one
--------------- -------------------------
10 1
System	
  Sta4s4cs	
  (noworkload)…	
  
select pname, pval1
from sys.aux_stats$;
PNAME PVAL1
-------------------- ----------
CPUSPEEDNW 2992.27468
IOSEEKTIM 10
IOTFRSPEED 4096
Cost	
  =	
  IO_Cost	
  +	
  CPU	
  Cost	
  
IO_Cost	
  =	
  ceil(#Blks/MBRC	
  *	
  Mread-m/Sread-m)	
  
CPU	
  Cost	
  =	
  ceil(CPUSpeed	
  /	
  (CPUCycles	
  *	
  Sread-m)	
  
+	
  _tablescan_cost_plus_one	
  
MBRC	
  =	
  db_file_mul-block_read_count	
  or	
  8	
  
Sread-m	
  =	
  IOSeek-m	
  +	
  db_block_size	
  /	
  IOTrfspeed	
  
Mread-m	
  =	
  IOSeek-m	
  +	
  dfmrc	
  or	
  8	
  *	
  db_block_size/IOTrfspeed	
  
System	
  Sta4s4cs	
  (noworkload)…	
  
Statistics Values
Blocks 39
Db_file_multiblock_read_count Non-default (=8)
Sreadtim 10 + (8192/4096) = 12
Mreadtim 10 + (8 * 8192/4096) = 26
SQL> select id, name from aioug where org_id = 1;
SQL> select operation, io_cost, cpu_cost, cost from plan_table
2 where operation='TABLE ACCESS';
OPERATION IO_COST CPU_COST COST
------------------------------ ---------- ---------- ----------
TABLE ACCESS 12 501736 12
SQL> select ceil(39/8*26/12), 1 "_table_scan_cost_plus_one" from dual
CEIL(39/8*26/12) _table_scan_cost_plus_one
---------------- -------------------------
11 1
•  Extended	
  StaMsMcs	
  –	
  Dependant	
  Columns	
  	
  
•  Histograms	
  –	
  Wherever	
  required	
  
•  FuncMons	
  on	
  Indexed	
  /	
  Non-­‐Indexed	
  Columns	
  
•  Deadly	
  Defaults	
  
•  Dynamic	
  Samplings	
  /	
  Cardinality	
  Feedback	
  
•  10053	
  
–  OpMmizer	
  Workings	
  
–  Using	
  Prorated	
  Density	
  (Out	
  of	
  Bound)	
  	
  
Cri4cal	
  to	
  know	
  about…	
  
THANK	
  YOU	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuningYogiji Creations
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Nelson Calero
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Guy Harrison
 
Aioug ha day oct2015 goldengate- High Availability Day 2015
Aioug ha day oct2015 goldengate- High Availability Day 2015Aioug ha day oct2015 goldengate- High Availability Day 2015
Aioug ha day oct2015 goldengate- High Availability Day 2015aioughydchapter
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query OptimizationAnju Garg
 
MySQL Optimizer Cost Model
MySQL Optimizer Cost ModelMySQL Optimizer Cost Model
MySQL Optimizer Cost ModelOlav Sandstå
 
Oracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance TuningOracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance TuningOracleTrainings
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning Arno Huetter
 
Less18 moving data
Less18 moving dataLess18 moving data
Less18 moving dataImran Ali
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Zohar Elkayam
 
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle DatabaseBest Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle DatabaseEdgar Alejandro Villegas
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsJohn Beresniewicz
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015Alex Zaballa
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Sandesh Rao
 
Porting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQLPorting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQLPeter Eisentraut
 
What's new in Oracle Trace File Analyzer version 12.2.1.1.0
What's new in Oracle Trace File Analyzer version 12.2.1.1.0What's new in Oracle Trace File Analyzer version 12.2.1.1.0
What's new in Oracle Trace File Analyzer version 12.2.1.1.0Sandesh Rao
 

Was ist angesagt? (20)

Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)
 
Aioug ha day oct2015 goldengate- High Availability Day 2015
Aioug ha day oct2015 goldengate- High Availability Day 2015Aioug ha day oct2015 goldengate- High Availability Day 2015
Aioug ha day oct2015 goldengate- High Availability Day 2015
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query Optimization
 
MySQL Optimizer Cost Model
MySQL Optimizer Cost ModelMySQL Optimizer Cost Model
MySQL Optimizer Cost Model
 
Oracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance TuningOracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance Tuning
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning
 
Less18 moving data
Less18 moving dataLess18 moving data
Less18 moving data
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
 
Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?Is SQLcl the Next Generation of SQL*Plus?
Is SQLcl the Next Generation of SQL*Plus?
 
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle DatabaseBest Practices – Extreme Performance with Data Warehousing on Oracle Database
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholds
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
 
Porting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQLPorting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQL
 
What's new in Oracle Trace File Analyzer version 12.2.1.1.0
What's new in Oracle Trace File Analyzer version 12.2.1.1.0What's new in Oracle Trace File Analyzer version 12.2.1.1.0
What's new in Oracle Trace File Analyzer version 12.2.1.1.0
 

Andere mochten auch

090327 02
090327 02090327 02
090327 02knagai
 
HadiDiVitoMarfiaNavoneCampanellaRiboniChap
HadiDiVitoMarfiaNavoneCampanellaRiboniChapHadiDiVitoMarfiaNavoneCampanellaRiboniChap
HadiDiVitoMarfiaNavoneCampanellaRiboniChapLoubna Abdel Hadi
 
Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists
Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists
Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists Deborah Y. Strauss D.V.M
 
Winter/Spring 09 Portfolio
Winter/Spring 09 PortfolioWinter/Spring 09 Portfolio
Winter/Spring 09 Portfolioommacreative
 
Horse SA presentation
Horse SA presentationHorse SA presentation
Horse SA presentationHorse SA
 
Aba effective instruction modules
Aba effective instruction modulesAba effective instruction modules
Aba effective instruction moduleshajiagha
 
Deborah Y. Strauss Presents: Fine Art Nature Photography
Deborah Y. Strauss Presents: Fine Art Nature PhotographyDeborah Y. Strauss Presents: Fine Art Nature Photography
Deborah Y. Strauss Presents: Fine Art Nature PhotographyDeborah Y. Strauss D.V.M
 
Freemium Summit East - Google Apps
Freemium Summit East - Google AppsFreemium Summit East - Google Apps
Freemium Summit East - Google AppsScott McMullan
 
Прекрасная половина Одноклассников: как соцсеть работает с женской аудиторией
Прекрасная половина Одноклассников: как соцсеть работает с женской аудиториейПрекрасная половина Одноклассников: как соцсеть работает с женской аудиторией
Прекрасная половина Одноклассников: как соцсеть работает с женской аудиториейMediaprojects Mail.Ru Group
 
Boots hair care promotions
Boots hair care promotionsBoots hair care promotions
Boots hair care promotionsAasish Gudi
 
Implementing cloud applications redefine your dimension
Implementing cloud applications   redefine your dimensionImplementing cloud applications   redefine your dimension
Implementing cloud applications redefine your dimensionaioughydchapter
 
Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...
Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...
Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...Social Gold
 
Oracle analytics cloud overview feb 2017
Oracle analytics cloud overview   feb 2017Oracle analytics cloud overview   feb 2017
Oracle analytics cloud overview feb 2017aioughydchapter
 
veshaal-singh-ebs-oracle cloud(iaas+paas)
veshaal-singh-ebs-oracle cloud(iaas+paas)veshaal-singh-ebs-oracle cloud(iaas+paas)
veshaal-singh-ebs-oracle cloud(iaas+paas)aioughydchapter
 
Dg broker & client connectivity - High Availability Day 2015
Dg broker & client connectivity -  High Availability Day 2015Dg broker & client connectivity -  High Availability Day 2015
Dg broker & client connectivity - High Availability Day 2015aioughydchapter
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteaioughydchapter
 

Andere mochten auch (20)

Yard Sale Flyer
Yard Sale FlyerYard Sale Flyer
Yard Sale Flyer
 
090327 02
090327 02090327 02
090327 02
 
HadiDiVitoMarfiaNavoneCampanellaRiboniChap
HadiDiVitoMarfiaNavoneCampanellaRiboniChapHadiDiVitoMarfiaNavoneCampanellaRiboniChap
HadiDiVitoMarfiaNavoneCampanellaRiboniChap
 
Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists
Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists
Deborah Y. Strauss, D.V.M: Inspirational Quotes From Inspirational Artists
 
Evento stage it-v1
Evento stage it-v1Evento stage it-v1
Evento stage it-v1
 
Winter/Spring 09 Portfolio
Winter/Spring 09 PortfolioWinter/Spring 09 Portfolio
Winter/Spring 09 Portfolio
 
Horse SA presentation
Horse SA presentationHorse SA presentation
Horse SA presentation
 
Aba effective instruction modules
Aba effective instruction modulesAba effective instruction modules
Aba effective instruction modules
 
spamzombieppt
spamzombiepptspamzombieppt
spamzombieppt
 
Deborah Y. Strauss Presents: Fine Art Nature Photography
Deborah Y. Strauss Presents: Fine Art Nature PhotographyDeborah Y. Strauss Presents: Fine Art Nature Photography
Deborah Y. Strauss Presents: Fine Art Nature Photography
 
Freemium Summit East - Google Apps
Freemium Summit East - Google AppsFreemium Summit East - Google Apps
Freemium Summit East - Google Apps
 
Прекрасная половина Одноклассников: как соцсеть работает с женской аудиторией
Прекрасная половина Одноклассников: как соцсеть работает с женской аудиториейПрекрасная половина Одноклассников: как соцсеть работает с женской аудиторией
Прекрасная половина Одноклассников: как соцсеть работает с женской аудиторией
 
Managing Fatigue
Managing FatigueManaging Fatigue
Managing Fatigue
 
Boots hair care promotions
Boots hair care promotionsBoots hair care promotions
Boots hair care promotions
 
Implementing cloud applications redefine your dimension
Implementing cloud applications   redefine your dimensionImplementing cloud applications   redefine your dimension
Implementing cloud applications redefine your dimension
 
Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...
Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...
Casual Connect Keynote - Creating a Bull Market: How to Manage a Successful V...
 
Oracle analytics cloud overview feb 2017
Oracle analytics cloud overview   feb 2017Oracle analytics cloud overview   feb 2017
Oracle analytics cloud overview feb 2017
 
veshaal-singh-ebs-oracle cloud(iaas+paas)
veshaal-singh-ebs-oracle cloud(iaas+paas)veshaal-singh-ebs-oracle cloud(iaas+paas)
veshaal-singh-ebs-oracle cloud(iaas+paas)
 
Dg broker & client connectivity - High Availability Day 2015
Dg broker & client connectivity -  High Availability Day 2015Dg broker & client connectivity -  High Availability Day 2015
Dg broker & client connectivity - High Availability Day 2015
 
Getting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suiteGetting optimal performance from oracle e business suite
Getting optimal performance from oracle e business suite
 

Ähnlich wie Query optimizer vivek sharma

A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013Connor McDonald
 
Histograms in 12c era
Histograms in 12c eraHistograms in 12c era
Histograms in 12c eraMauro Pagano
 
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdfDatabase & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdfInSync2011
 
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321maclean liu
 
Histograms : Pre-12c and Now
Histograms : Pre-12c and NowHistograms : Pre-12c and Now
Histograms : Pre-12c and NowAnju Garg
 
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...Rainer Schuettengruber
 
SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?Andrej Pashchenko
 
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfNOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfcookie1969
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsRajendran
 
Query Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New TricksQuery Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New TricksMYXPLAIN
 
Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Alexey Ermakov
 
SQL Plan Directives explained
SQL Plan Directives explainedSQL Plan Directives explained
SQL Plan Directives explainedMauro Pagano
 
SFDC Advanced Apex
SFDC Advanced Apex SFDC Advanced Apex
SFDC Advanced Apex Sujit Kumar
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentationMichael Keane
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON? Sveta Smirnova
 
Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010Riyaj Shamsudeen
 
Oracle Query Optimizer - An Introduction
Oracle Query Optimizer - An IntroductionOracle Query Optimizer - An Introduction
Oracle Query Optimizer - An Introductionadryanbub
 

Ähnlich wie Query optimizer vivek sharma (20)

A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013
 
Histograms in 12c era
Histograms in 12c eraHistograms in 12c era
Histograms in 12c era
 
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdfDatabase & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
 
Oracle 12c SPM
Oracle 12c SPMOracle 12c SPM
Oracle 12c SPM
 
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
 
Histograms : Pre-12c and Now
Histograms : Pre-12c and NowHistograms : Pre-12c and Now
Histograms : Pre-12c and Now
 
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
2018 db-rainer schuettengruber-beating-oracles_optimizer_at_its_own_game-pres...
 
SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?SQL Macros - Game Changing Feature for SQL Developers?
SQL Macros - Game Changing Feature for SQL Developers?
 
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdfNOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
 
Do You Know The 11g Plan?
Do You Know The 11g Plan?Do You Know The 11g Plan?
Do You Know The 11g Plan?
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
 
Query Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New TricksQuery Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New Tricks
 
Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance
 
SQL Plan Directives explained
SQL Plan Directives explainedSQL Plan Directives explained
SQL Plan Directives explained
 
SFDC Advanced Apex
SFDC Advanced Apex SFDC Advanced Apex
SFDC Advanced Apex
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
 
Cost Based Oracle
Cost Based OracleCost Based Oracle
Cost Based Oracle
 
Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010
 
Oracle Query Optimizer - An Introduction
Oracle Query Optimizer - An IntroductionOracle Query Optimizer - An Introduction
Oracle Query Optimizer - An Introduction
 

Mehr von aioughydchapter

Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_aioughydchapter
 
Oracle IaaS Overview - AIOUG Hyderabad Chapter
Oracle IaaS Overview - AIOUG Hyderabad ChapterOracle IaaS Overview - AIOUG Hyderabad Chapter
Oracle IaaS Overview - AIOUG Hyderabad Chapteraioughydchapter
 
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud DayRole of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Dayaioughydchapter
 
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd ChapterOracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapteraioughydchapter
 
Oracle rac cachefusion - High Availability Day 2015
Oracle rac cachefusion - High Availability Day 2015Oracle rac cachefusion - High Availability Day 2015
Oracle rac cachefusion - High Availability Day 2015aioughydchapter
 
Aman sharma hyd_12crac High Availability Day 2015
Aman sharma hyd_12crac High Availability Day 2015Aman sharma hyd_12crac High Availability Day 2015
Aman sharma hyd_12crac High Availability Day 2015aioughydchapter
 
Ebs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practicesEbs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practicesaioughydchapter
 
Ebs12.2 online patching
Ebs12.2 online patching Ebs12.2 online patching
Ebs12.2 online patching aioughydchapter
 
Performance tuning intro
Performance tuning introPerformance tuning intro
Performance tuning introaioughydchapter
 

Mehr von aioughydchapter (13)

Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_
 
Oracle IaaS Overview - AIOUG Hyderabad Chapter
Oracle IaaS Overview - AIOUG Hyderabad ChapterOracle IaaS Overview - AIOUG Hyderabad Chapter
Oracle IaaS Overview - AIOUG Hyderabad Chapter
 
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud DayRole of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
Role of DBAs in CLOUD ERA - AIOUG Hyd Chapter - Oracle Cloud Day
 
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd ChapterOracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
Oracle Cloud Day(IaaS, PaaS,SaaS) - AIOUG Hyd Chapter
 
Oracle rac cachefusion - High Availability Day 2015
Oracle rac cachefusion - High Availability Day 2015Oracle rac cachefusion - High Availability Day 2015
Oracle rac cachefusion - High Availability Day 2015
 
Aman sharma hyd_12crac High Availability Day 2015
Aman sharma hyd_12crac High Availability Day 2015Aman sharma hyd_12crac High Availability Day 2015
Aman sharma hyd_12crac High Availability Day 2015
 
Dmz aa aioug
Dmz aa aiougDmz aa aioug
Dmz aa aioug
 
Editioning use in ebs
Editioning use in  ebsEditioning use in  ebs
Editioning use in ebs
 
Ebs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practicesEbs upgrade-to-12.2 technical-upgrade_best_practices
Ebs upgrade-to-12.2 technical-upgrade_best_practices
 
Ebs12.2 online patching
Ebs12.2 online patching Ebs12.2 online patching
Ebs12.2 online patching
 
Indexes overview
Indexes overviewIndexes overview
Indexes overview
 
AWR & ASH Analysis
AWR & ASH AnalysisAWR & ASH Analysis
AWR & ASH Analysis
 
Performance tuning intro
Performance tuning introPerformance tuning intro
Performance tuning intro
 

Kürzlich hochgeladen

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Kürzlich hochgeladen (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

Query optimizer vivek sharma

  • 1. Oracle  Query  Optimizer   Hyderabad  –  30th  May  2015  
  • 2. About  me…   Vivek  Sharma,   Blog  url  :  h3p://viveklsharma.wordpress.com   Email  :  vlsharma@hotmail.com   A  Regular  Speaker  for  AIOUG     Speaker  of  the  Year  –  Sangam  2012  
  • 3. •  Cursors   •  SelecMvity   •  Cardinality   Key  Concepts…  
  • 4. •  Cursors   •  SelecMvity   •  Cardinality   Key  Concepts…   Client  /   Applica-on   Handle   Server  Process    Memory   Private  SQL  Area   SGA   Library  Cache   Shared  SQL  Area  
  • 5. Syntax  /  Seman-cs  Checks   Sharable  Parent   Cursor  Available  ?   Execute   Store  Parent  Cursor  in   Library  Cache   Query  Transforma-on  /   Execu-on  Plans   Store  child  Cursor  in  Library   Cache   Sharable  Child   Cursor  Available  ?   N   N   Y   Y   Life  4me  of  a  Cursor…  
  • 6. Syntax  /  Seman-cs  Checks   Sharable  Parent   Cursor  Available  ?   Execute   Store  Parent  Cursor  in   Library  Cache   Query  Transforma-on  /   Execu-on  Plans   Store  child  Cursor  in  Library   Cache   Sharable  Child   Cursor  Available  ?   N   N   Y   Y   Life  4me  of  a  Cursor…  
  • 7. •  Cursors   •  SelecMvity   •  Cardinality   Key  Concepts…   ü  Value  between  0  and  1   ü  Represents  FracMon  or  %age  of  rows  filtered   ü  Drives  the  Access  Path   ü  With  no-­‐histograms,  it  is  Density  or  1/Num_DisMnct   ü  Close  to  0  –  Low  /    Close  to  1  -­‐  High  
  • 8. •  Cursors   •  SelecMvity   •  Cardinality   Key  Concepts…   ü  Number  of  rows  returned  by  an  OperaMon   ü  Drives  Access  Order   ü  SelecMvity  *  Num_Rows  
  • 9. Introduc4on  to  Query  Op4mizer…   SQL   Query   OpMmizer   Object  StaMsMcs   System  StaMsMcs   Database  Design   Fixed  Plans   ExecuMon  Environment   Bind  Variables   Dynamic  Sampling   Cardinality  Feedback   ExecuMon   Plan  
  • 10. Object  Sta4s4cs…   •  Table  StaMsMcs     o  num_rows   o  Blocks   •  Index  StaMsMcs     o  blevel   o  leaf_blocks   o  clustering_factor     •  Column  StaMsMcs     o  num_disMnct   o  num_nulls   o  density  (1/num_disMnct)   o  low_value   o  high_value   •  ParMMon  Level  StaMsMcs   o  Single  ParMMon  Scan   •  Global  StaMsMcs  (Table  Level)   o  All  or  MulMple  ParMMons  Scan   •  Histograms   o  Frequency  Based   o  Height  Balanced   o  Top  Frequency   o  Hybrid   With  Frequency  1/(2*num_rows)  
  • 11. Object  Sta4s4cs  (Cardinality  -­‐  No  Nulls)…   Statistics Values Num_rows 1000 Num_distinct 10 (low 1 and high 10) Blocks 39 Predicate ORG_ID 1 Density (org_id) 0.1 (No Nulls) SQL> select id, name from aioug where org_id = 1; PLAN_TABLE_OUTPUT -------------------------------------------------------------------------- Plan hash value: 1667281916 --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 100 | 1800 | 12 (0)| 00:00:01 | |* 1 | TABLE ACCESS FULL| AIOUG | 100 | 1800 | 12 (0)| 00:00:01 | ---------------------------------------------------------------------------
  • 12. Statistics Values Num_rows 1000 Num_distinct 10 (low 1 and high 10) Blocks 39 Density (org_id) 0.1 (No Nulls) Base Selectivity 0.1 * ((1000-0)/1000) = 0.1 Cardinality 0.1 * 1000 = 100 Object  Sta4s4cs  (Cardinality  -­‐  No  Nulls)…  
  • 13. Object  Sta4s4cs  (Cardinality  Few  Nulls)…   Statistics Values Num_rows 1000 Num_distinct 10 (low 1 and high 10) Blocks 39 Predicate ORG_ID_N 1 Density (org_id_n) 0.1 (100 Nulls) SQL> select id, name from aioug where org_id_n = 1; PLAN_TABLE_OUTPUT -------------------------------------------------------------------------- Plan hash value: 1667281916 --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 90 | 1620 | 12 (0)| 00:00:01 | |* 1 | TABLE ACCESS FULL| AIOUG | 90 | 1620 | 12 (0)| 00:00:01 | ---------------------------------------------------------------------------
  • 14. Object  Sta4s4cs  (Cardinality  Few  Nulls)…   Statistics Values Num_rows 1000 Num_distinct 10 (low 1 and high 10) Blocks 39 Density (org_id_n) 0.1 (100 Nulls) Base Selectivity 0.1 * ((1000-100)/1000) = 0.09 Cardinality 0.09 * 1000 = 90
  • 15. Out  of  Bound  (Cardinality  -­‐  No  Nulls)…   Statistics Values Num_rows 1000 Num_distinct 10 (low 1 and high 10) Blocks 39 Predicate ORG_ID 14 Density (org_id) 0.1 (No Nulls) SQL> select id, name from aioug where org_id = 14; PLAN_TABLE_OUTPUT -------------------------------------------------------------------------- Plan hash value: 1667281916 --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 56 | 1008 | 11 (0)| 00:00:01 | |* 1 | TABLE ACCESS FULL| AIOUG | 56 | 1008 | 11 (0)| 00:00:01 | ---------------------------------------------------------------------------
  • 16. Statistics Values Num_rows 1000 Num_distinct 10 (low 1 and high 10) Blocks 39 Density (org_id) 0.1 (No Nulls) Base Selectivity 0.1 * ((1000-0)/1000) = 0.1 Required Value (org_id) 14 Out of Bound Factor ((14-10)/(10-1)) = 0.44444 Cardinality (0.1 * 1000) – (0.1*1000*0.4444) = 56 Out  of  Bound  (Cardinality  -­‐  No  Nulls)…  
  • 17. •  utl_raw.cast_to_*     •  dbms_stats.convert_raw_value   Low  &  High  Value  (Deciphering)…   select column_name, low_value, high_value from dba_tab_columns where owner='SCOTT' and table_name='AIOUG' order by 1; COLUMN_NAME LOW_VALUE HIGH_VALUE -------------------- ----------------------- ----------------------- ID C102 C20B NAME 41477349586C68677566 7A7073484A505A44544F ORG_ID C102 C10B ORG_ID_N C102 C10B
  • 18. Object  Sta4s4cs…   •  Table  StaMsMcs     o  num_rows   o  Blocks   •  Index  StaMsMcs     o  blevel   o  leaf_blocks   o  clustering_factor     •  Column  StaMsMcs     o  num_disMnct   o  num_nulls   o  density  (1/num_disMnct)   o  low_value   o  high_value   •  ParMMon  Level  StaMsMcs   o  Single  ParMMon  Scan   •  Global  StaMsMcs  (Table  Level)   o  All  or  MulMple  ParMMons  Scan   •  Histograms   o  Frequency  Based   o  Height  Based   o  Top  Frequency   o  Hybrid  (12c)   With  Frequency  1/(2*num_rows)  
  • 19. Index  Sta4s4cs  (low  Clustering  Factor)…   Statistics Indexed Column ORG_ID ORG_ID_M Num_rows 1000 1000 Blevel 1 1 Leaf_Blocks 2 2 Clustering_Factor 34 337 SQL> select id, name from aioug where org_id = 1; Plan hash value: 1442557996 ------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Cost (%CPU)| ------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 100 | 5 (0)| | 1 | TABLE ACCESS BY INDEX ROWID BATCHED| AIOUG | 100 | 5 (0)| | 2 | INDEX RANGE SCAN | AIOUG_ORG_ID_IDX | 100 | 1 (0)| -------------------------------------------------------------------------------------
  • 20. Index  Sta4s4cs  (High  Clustering  Factor)…   SQL> select id, name from aioug where org_id_m = 1; Plan hash value: 1667281916 -------------------------------------------------------- | Id | Operation | Name | Rows | Cost (%CPU)| -------------------------------------------------------- | 0 | SELECT STATEMENT | | 100 | 12 (9)| | 1 | TABLE ACCESS FULL| AIOUG | 100 | 12 (9)| -------------------------------------------------------- Statistics Indexed Column ORG_ID ORG_ID_M Num_rows 1000 1000 Blevel 1 1 Leaf_Blocks 2 2 Clustering_Factor 34 337
  • 21. Cost = blevel + ceil(leaf_blocks * index_selectivity) + ceil(clustering_factor * table_selectivity) Cost  of  an  Index  Scan   Cost  of  a  Table  Scan  via  Index   CalculaMon  of  CF  (10  Row  3  Block  Table  with  an  Index)   Index Entry Table Block CF A 1 1 A 1 1 A 2 2 B 3 3 B 1 4 C 3 5 C 2 6 C 2 6 D 1 7 D 3 8 Good  :  Near  to  Table.blocks   Bad  :  Near  to  Table.num_rows   Index  Sta4s4cs  (Clustering  Factor)…  
  • 22. •  SREADTIM     •  MREADTIM   •  MBRC   •  CPUSPEED   •  IOSEEKTIM   •  IOTRFSPEED   •  CPUSPEEDNW   System  Sta4s4cs…   Workload  StaMsMcs   NoWorkload  StaMsMcs  
  • 23. System  Sta4s4cs  (workload)…   select pname, pval1 from sys.aux_stats$; PNAME PVAL1 -------------------- ---------- SREADTIM 2 MREADTIM 5 CPUSPEED 500 MBRC 10 MAXTHR SLAVETHR Cost  =  IO_Cost  +  CPU  Cost   IO_Cost  =  ceil(#Blks/MBRC  *  Mread-m/Sread-m)   CPU  Cost  =  ceil(CPUSpeed  /  (CPUCycles  *  Sread-m)   +  _tablescan_cost_plus_one  
  • 24. System  Sta4s4cs  (workload)…   Statistics Values Blocks 39 MBRC 10 Mreadtim / Sreadtim 5 / 2 SQL> select id, name from aioug where org_id = 1; SQL> select operation, io_cost, cpu_cost, cost from plan_table 2 where operation='TABLE ACCESS'; OPERATION IO_COST CPU_COST COST ------------------------------ ---------- ---------- ---------- TABLE ACCESS 11 501736 12 SQL> select ceil(39/10*5/2), 1 "_table_scan_cost_plus_one" from dual; CEIL(39/10*5/2) _table_scan_cost_plus_one --------------- ------------------------- 10 1
  • 25. System  Sta4s4cs  (noworkload)…   select pname, pval1 from sys.aux_stats$; PNAME PVAL1 -------------------- ---------- CPUSPEEDNW 2992.27468 IOSEEKTIM 10 IOTFRSPEED 4096 Cost  =  IO_Cost  +  CPU  Cost   IO_Cost  =  ceil(#Blks/MBRC  *  Mread-m/Sread-m)   CPU  Cost  =  ceil(CPUSpeed  /  (CPUCycles  *  Sread-m)   +  _tablescan_cost_plus_one   MBRC  =  db_file_mul-block_read_count  or  8   Sread-m  =  IOSeek-m  +  db_block_size  /  IOTrfspeed   Mread-m  =  IOSeek-m  +  dfmrc  or  8  *  db_block_size/IOTrfspeed  
  • 26. System  Sta4s4cs  (noworkload)…   Statistics Values Blocks 39 Db_file_multiblock_read_count Non-default (=8) Sreadtim 10 + (8192/4096) = 12 Mreadtim 10 + (8 * 8192/4096) = 26 SQL> select id, name from aioug where org_id = 1; SQL> select operation, io_cost, cpu_cost, cost from plan_table 2 where operation='TABLE ACCESS'; OPERATION IO_COST CPU_COST COST ------------------------------ ---------- ---------- ---------- TABLE ACCESS 12 501736 12 SQL> select ceil(39/8*26/12), 1 "_table_scan_cost_plus_one" from dual CEIL(39/8*26/12) _table_scan_cost_plus_one ---------------- ------------------------- 11 1
  • 27. •  Extended  StaMsMcs  –  Dependant  Columns     •  Histograms  –  Wherever  required   •  FuncMons  on  Indexed  /  Non-­‐Indexed  Columns   •  Deadly  Defaults   •  Dynamic  Samplings  /  Cardinality  Feedback   •  10053   –  OpMmizer  Workings   –  Using  Prorated  Density  (Out  of  Bound)     Cri4cal  to  know  about…