SlideShare a Scribd company logo
1 of 1
Download to read offline
Interpreting Execution Plans
1. :
1. ;
2. ;
3. ;
2. :
1. SQL ;
2. , ;
3. :
1. PLAN_TABLE: EXPLAIN PLAN SQL/PLUS autotrace , ;
2. v$sql_plan: Shared Pool Library Cache ;
3. v$sql_plan_monitor:11g ;
4. dba_hist_sql_plan: AWR ;
5. stats$sql_plan: Statspack ;
6. SQL Management Base: SQL Plan Management Baselines ;
7. SQL tuning set;
8. DBMS_MONITOR trace : 10046 ;
9. 10053 trace ;
10. 10gR2 dump ;
4. :
1. , , SQL , DBMS_XPLAN
;
2. DBMS_XPLAN.DISPLAY(): plan_table ;
3. DBMS_XPLAN.DISPLAY_CURSOR(): v$sql_plan ;
4. DBMS_XPLAN.DISPLAY_AWR(): AWR ;
5. DBMS_XPLAN.DISPLAY_SQLSET(): SQL tuning set ;
6. DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE(): SQL Plan Management Baselines
;
5. EXPLAIN TABLE :
1. , PLAN_TABLE , SQL ;
2. :EXPLAIN PLAN [SET STATEMENT_ID = 'text'] [INTO plan_table] FOR statement;
PLAN_TABLE ;
3. PLAN_TABLE:
1. EXPLAN_PLAN PLAN_TABLE, , sys.plan_table$
;SELECT * FROM dba_synonyms WHERE synonym_name = 'PLAN_TABLE';SELECT
table_name, TEMPORARY, duration FROM dba_tables WHERE table_name =
'PLAN_TABLE$';
2. $ORACLE_HOME/rdbms/admin/utlxplan.sql , ,
session , ;
3. SQL ; , ,
;
4. , ID PAREANT_ID ;
4. DBMS_XPLAN.DISPLAY :DBMS_XPLAN.DISPLAY(table_name, statement_id, format,
filter_preds):
1. table_name: PLAN_TABLE ;
2. statement_id: , ;
3. format: TYPICAL , , ;
4. ;
5. statement_id ;
6. ;
6. AUTOTRACE:
1. AUTOTRACE sql*plus , oracle7.3 , PLAN_TABLE ;
2. PLUSTRACE v$ , $ORACLE_HOME/sqlplus/admin/plustrce.sql
;
3. , ;
4. EXPLAIN PLAN , ;
5. :SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]];
1. ON: trace ;
2. TRACEONLY: ;
6. :show autotrace;
7. :
1. recursive calls: , , , . , ;
, , ; shared_pool :alter system flush
shared_pool;
2. db block gets: block . DML db block gets ,
,SELECT , REDO CR ;
3. consistent gets: ( BLOCK), , arraysize ;
1. arraysize: , show arraysize ;
2. :consistent gets=rows processed/arraysize, ;
3. arraysize , ;
4. physical reads: , BLOCK ,BUFFER CACHE , BUFFER
CACHE :alter system flush buffer_cache;
5. redo size: , DML ;
6. bytes sent via SQL*Net to client: ;
7. bytes received via SQL*Net from client: ;
8. SQL*Net roundtrips to/from client:SQL , arraysize ;
9. sorts (memory): , PGA;
10. sorts (disk): , ;
11. rows processed: ;
8. v$sql_plan:
1. v$sql_plan: library cahce ;PLAN_TABLE ;
2. sql_id v$sql , address hash_value ;
3. :
1. HASH_VALUE: library cache ;
2. ADDRESS: SQL , ;
3. CHILD_NUMBER: CURSOR ;
4. POSITION: PARENT_ID ;
5. PARENT_ID: ID, , , ;
6. ID: ;
7. PLAN_HASH_VALUE: ;
4. :SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR('sql_id'));
5. v$sql_plan_statistics:
1. STATISTICS_LEVEL ALL ;
2. GATHER_PLAN_STATISTICS hint;
3. v$sql_plan_statistics_all: ;
6. v$sql_workarea: SQL CURSOR ;
9. AWR:
1. AWR , , ;
2. :
1. ;
2. ;
3. session ;
4. ASH(Active Session History) ;
3. ;
4. AWR :
1. V$ACTIVE_SESSION_HISTORY;
2. V$metric views;
3. DBA_HIST views:
1. DBA_HIST_ACTIVE_SESS_HISTORY;
2. DBA_HIST_BASELINE;
3. DBA_HIST_DATABASE_INSTANCE;
4. DBA_HIST_SNAPSHOT;
5. DBA_HIST_SQL_PLAN;
6. DBA_HIST_WR_CONTROL;
5. sql_id AWR sql : SELECT plan_table_output FROM
TABLE(DBMS_XPLAN.DISPLAY_AWR('g22czkqq3pxmb'));
6. AWR SQL :@$ORACLE_HOME/rdbms/admin/awrsqrpt;
10. SQL Monitoring:11g;
11. :
1. :
1. , ;
2. ;
3. ;
2. :
1. : , , , ;
2. : , , , ;
3. : , , , ;
3. :
1. :356421;
2. :43652871;
3. :325410;
4. :
1. , ;
2. ;
3. , , ;
4. ;
12. , SQL Tuning Advisor ;

More Related Content

What's hot

Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userDesty Yani
 
System performance tuning
System performance tuningSystem performance tuning
System performance tuningMenandro Oba
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
ControlfilemanagementVinay Thota
 
10 ソーシャルブックマーク3
10 ソーシャルブックマーク310 ソーシャルブックマーク3
10 ソーシャルブックマーク3文樹 高橋
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed FilesAnar Godjaev
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklistpraveen_01236
 

What's hot (8)

Memory Management
Memory ManagementMemory Management
Memory Management
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan user
 
System performance tuning
System performance tuningSystem performance tuning
System performance tuning
 
Nls
NlsNls
Nls
 
Controlfilemanagement
ControlfilemanagementControlfilemanagement
Controlfilemanagement
 
10 ソーシャルブックマーク3
10 ソーシャルブックマーク310 ソーシャルブックマーク3
10 ソーシャルブックマーク3
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 

Similar to SQL Tuning04-Interpreting Execution Plans

Performance Tuning Tool01-Statspack
Performance Tuning Tool01-StatspackPerformance Tuning Tool01-Statspack
Performance Tuning Tool01-StatspackZhaoyang Wang
 
55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx FranceDavid Delabassee
 
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...Marco Vigelini
 
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...TAISEEREISA
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseuzzal basak
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜Michitoshi Yoshida
 
1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocp
1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocp1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocp
1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocpIsabella789
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11gfcamachob
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01Karam Abuataya
 

Similar to SQL Tuning04-Interpreting Execution Plans (20)

Performance Tuning Tool01-Statspack
Performance Tuning Tool01-StatspackPerformance Tuning Tool01-Statspack
Performance Tuning Tool01-Statspack
 
Advance Mobile Application Development class 01
Advance Mobile Application Development class 01Advance Mobile Application Development class 01
Advance Mobile Application Development class 01
 
Cdc
CdcCdc
Cdc
 
55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France
 
Msql
Msql Msql
Msql
 
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
LECTURE NOTES.pdf
LECTURE NOTES.pdfLECTURE NOTES.pdf
LECTURE NOTES.pdf
 
LECTURE NOTES.pdf
LECTURE NOTES.pdfLECTURE NOTES.pdf
LECTURE NOTES.pdf
 
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby database
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜
 
1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocp
1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocp1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocp
1z0 034 exam-upgrade oracle9i10g oca to oracle database 11g ocp
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
SQL Tracing
SQL TracingSQL Tracing
SQL Tracing
 
MYSQL - PHP Database Connectivity
MYSQL - PHP Database ConnectivityMYSQL - PHP Database Connectivity
MYSQL - PHP Database Connectivity
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11g
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 

More from Zhaoyang Wang

海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)Zhaoyang Wang
 
云管理平台助力海通金融云建设
云管理平台助力海通金融云建设云管理平台助力海通金融云建设
云管理平台助力海通金融云建设Zhaoyang Wang
 
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)Zhaoyang Wang
 
Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践Zhaoyang Wang
 
Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍Zhaoyang Wang
 
Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站Zhaoyang Wang
 
Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请Zhaoyang Wang
 
Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请Zhaoyang Wang
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7Zhaoyang Wang
 
SQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO OptimizerSQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO OptimizerZhaoyang Wang
 
SQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL TuningSQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL TuningZhaoyang Wang
 
MySQL Fulltext Search Tutorial
MySQL Fulltext Search TutorialMySQL Fulltext Search Tutorial
MySQL Fulltext Search TutorialZhaoyang Wang
 
Data Organization in InnoDB
Data Organization in InnoDBData Organization in InnoDB
Data Organization in InnoDBZhaoyang Wang
 
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...Zhaoyang Wang
 
Oracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installationOracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installationZhaoyang Wang
 
MYSQLCLONE Introduction
MYSQLCLONE IntroductionMYSQLCLONE Introduction
MYSQLCLONE IntroductionZhaoyang Wang
 
Oracle security 08-oracle network security
Oracle security 08-oracle network securityOracle security 08-oracle network security
Oracle security 08-oracle network securityZhaoyang Wang
 
Oracle security 02-administering user security
Oracle security 02-administering user securityOracle security 02-administering user security
Oracle security 02-administering user securityZhaoyang Wang
 
Interpreting execution plans
Interpreting execution plansInterpreting execution plans
Interpreting execution plansZhaoyang Wang
 

More from Zhaoyang Wang (20)

海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)
 
云管理平台助力海通金融云建设
云管理平台助力海通金融云建设云管理平台助力海通金融云建设
云管理平台助力海通金融云建设
 
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
 
Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践
 
Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍
 
Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站
 
Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请
 
Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7
 
SQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO OptimizerSQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO Optimizer
 
SQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL TuningSQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL Tuning
 
MySQL Fulltext Search Tutorial
MySQL Fulltext Search TutorialMySQL Fulltext Search Tutorial
MySQL Fulltext Search Tutorial
 
Data Organization in InnoDB
Data Organization in InnoDBData Organization in InnoDB
Data Organization in InnoDB
 
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
 
Oracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installationOracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installation
 
Why use MySQL
Why use MySQLWhy use MySQL
Why use MySQL
 
MYSQLCLONE Introduction
MYSQLCLONE IntroductionMYSQLCLONE Introduction
MYSQLCLONE Introduction
 
Oracle security 08-oracle network security
Oracle security 08-oracle network securityOracle security 08-oracle network security
Oracle security 08-oracle network security
 
Oracle security 02-administering user security
Oracle security 02-administering user securityOracle security 02-administering user security
Oracle security 02-administering user security
 
Interpreting execution plans
Interpreting execution plansInterpreting execution plans
Interpreting execution plans
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

SQL Tuning04-Interpreting Execution Plans

  • 1. Interpreting Execution Plans 1. : 1. ; 2. ; 3. ; 2. : 1. SQL ; 2. , ; 3. : 1. PLAN_TABLE: EXPLAIN PLAN SQL/PLUS autotrace , ; 2. v$sql_plan: Shared Pool Library Cache ; 3. v$sql_plan_monitor:11g ; 4. dba_hist_sql_plan: AWR ; 5. stats$sql_plan: Statspack ; 6. SQL Management Base: SQL Plan Management Baselines ; 7. SQL tuning set; 8. DBMS_MONITOR trace : 10046 ; 9. 10053 trace ; 10. 10gR2 dump ; 4. : 1. , , SQL , DBMS_XPLAN ; 2. DBMS_XPLAN.DISPLAY(): plan_table ; 3. DBMS_XPLAN.DISPLAY_CURSOR(): v$sql_plan ; 4. DBMS_XPLAN.DISPLAY_AWR(): AWR ; 5. DBMS_XPLAN.DISPLAY_SQLSET(): SQL tuning set ; 6. DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE(): SQL Plan Management Baselines ; 5. EXPLAIN TABLE : 1. , PLAN_TABLE , SQL ; 2. :EXPLAIN PLAN [SET STATEMENT_ID = 'text'] [INTO plan_table] FOR statement; PLAN_TABLE ; 3. PLAN_TABLE: 1. EXPLAN_PLAN PLAN_TABLE, , sys.plan_table$ ;SELECT * FROM dba_synonyms WHERE synonym_name = 'PLAN_TABLE';SELECT table_name, TEMPORARY, duration FROM dba_tables WHERE table_name = 'PLAN_TABLE$'; 2. $ORACLE_HOME/rdbms/admin/utlxplan.sql , , session , ; 3. SQL ; , , ; 4. , ID PAREANT_ID ; 4. DBMS_XPLAN.DISPLAY :DBMS_XPLAN.DISPLAY(table_name, statement_id, format, filter_preds): 1. table_name: PLAN_TABLE ; 2. statement_id: , ; 3. format: TYPICAL , , ; 4. ; 5. statement_id ; 6. ; 6. AUTOTRACE: 1. AUTOTRACE sql*plus , oracle7.3 , PLAN_TABLE ; 2. PLUSTRACE v$ , $ORACLE_HOME/sqlplus/admin/plustrce.sql ; 3. , ; 4. EXPLAIN PLAN , ; 5. :SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]; 1. ON: trace ; 2. TRACEONLY: ; 6. :show autotrace; 7. : 1. recursive calls: , , , . , ; , , ; shared_pool :alter system flush shared_pool; 2. db block gets: block . DML db block gets , ,SELECT , REDO CR ; 3. consistent gets: ( BLOCK), , arraysize ; 1. arraysize: , show arraysize ; 2. :consistent gets=rows processed/arraysize, ; 3. arraysize , ; 4. physical reads: , BLOCK ,BUFFER CACHE , BUFFER CACHE :alter system flush buffer_cache; 5. redo size: , DML ; 6. bytes sent via SQL*Net to client: ; 7. bytes received via SQL*Net from client: ; 8. SQL*Net roundtrips to/from client:SQL , arraysize ; 9. sorts (memory): , PGA; 10. sorts (disk): , ; 11. rows processed: ; 8. v$sql_plan: 1. v$sql_plan: library cahce ;PLAN_TABLE ; 2. sql_id v$sql , address hash_value ; 3. : 1. HASH_VALUE: library cache ; 2. ADDRESS: SQL , ; 3. CHILD_NUMBER: CURSOR ; 4. POSITION: PARENT_ID ; 5. PARENT_ID: ID, , , ; 6. ID: ; 7. PLAN_HASH_VALUE: ; 4. :SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR('sql_id')); 5. v$sql_plan_statistics: 1. STATISTICS_LEVEL ALL ; 2. GATHER_PLAN_STATISTICS hint; 3. v$sql_plan_statistics_all: ; 6. v$sql_workarea: SQL CURSOR ; 9. AWR: 1. AWR , , ; 2. : 1. ; 2. ; 3. session ; 4. ASH(Active Session History) ; 3. ; 4. AWR : 1. V$ACTIVE_SESSION_HISTORY; 2. V$metric views; 3. DBA_HIST views: 1. DBA_HIST_ACTIVE_SESS_HISTORY; 2. DBA_HIST_BASELINE; 3. DBA_HIST_DATABASE_INSTANCE; 4. DBA_HIST_SNAPSHOT; 5. DBA_HIST_SQL_PLAN; 6. DBA_HIST_WR_CONTROL; 5. sql_id AWR sql : SELECT plan_table_output FROM TABLE(DBMS_XPLAN.DISPLAY_AWR('g22czkqq3pxmb')); 6. AWR SQL :@$ORACLE_HOME/rdbms/admin/awrsqrpt; 10. SQL Monitoring:11g; 11. : 1. : 1. , ; 2. ; 3. ; 2. : 1. : , , , ; 2. : , , , ; 3. : , , , ; 3. : 1. :356421; 2. :43652871; 3. :325410; 4. : 1. , ; 2. ; 3. , , ; 4. ; 12. , SQL Tuning Advisor ;