SlideShare uma empresa Scribd logo
1 de 13
Presented By
www.orienit.com
 Hints give specific information that we
know about our data and application.
 A way to override the default query
optimization in the DBMS
 Influence the execution plan of query
www.orienit.com
 Oracle optimizer may not always choose
the best execution plan
 Using hints may improve the performance
by changing the execution plan oracle
takes.
www.orienit.com
 Hints can be used in the Select, Delete, and
Update clauses.
 In each statement, the hint goes directly
after the Select, Delete, or Update
keyword. A few hints use Insert.
 Hints are placed in the /*+ */ tag, where
the hint goes after the + sign
 Ex: SELECT /*+ ALL_ROWS */ From…
www.orienit.com
 Approach hints
 Access hints
 Join hints
 Misc. hints
www.orienit.com
 ALL_ROWS: Minimizes total resource
consumption. Results will be returned
only after all processing has been
completed
 FIRST_ROWS(n): Minimized response
time, or minimal resource usage to return
the first n rows.
www.orienit.com
 FULL(table): Chooses a full table scan for
the table, even if there is an index available.
 INDEX(table [index [index]...]): Chooses an
Index scan for the table.
www.orienit.com
 CIS Department has far more males than
females
 SELECT /*+ FULL(s) */ id, name
FROM Student s
WHERE sex = ‘m’;
 SELECT /*+ Index(s sex_index) */ id, name
FROM Student s
WHERE sex = ‘f’;
www.orienit.com
 ORDERED: tables are joined in the order in
which they appear in the FROM clause.
 LEADING(table): specified table is the first
table used in the join order.
 USE_HASH(table [table] …): Tables are
joined using a hash join. Smaller table is
used to make a hash table on join key. The
larger table is scanned using hash table to
find joined rows.
www.orienit.com
 USE_NL(table [table]…): Joins tables using
nested loops join, using specified table as
inner join. For every row in outer table, oracle
accesses every row in inner table.
 USE_MERGE(table [table]…): Joins tables
using a sort-merge join. Sorted list are made
and then merged together. Best if tables are
already sorted.
www.orienit.com
 APPEND: Data is appended to the end of table,
rather then using existing space.
 CACHE(table): Blocks received are placed at
the most recently used end of the LRU list in
the buffer cache when a full table scan is
preformed.
 NOCACHE(table): Blocks received are placed
at the least recently used end of the LRU list in
the buffer cache.
www.orienit.com
 Oracle documentation at:
http://oracle.cis.ksu.edu/oradocs/index.htm
www.orienit.com
Beier hints

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
 
Office technology
Office technology Office technology
Office technology
 
How to use Hlookup find an exact match
How to use Hlookup find an exact match How to use Hlookup find an exact match
How to use Hlookup find an exact match
 
Spreadhsheets 1
Spreadhsheets 1Spreadhsheets 1
Spreadhsheets 1
 
10 Excel Formulas that will help you in any Job
10 Excel Formulas that will help you in any Job10 Excel Formulas that will help you in any Job
10 Excel Formulas that will help you in any Job
 
Use of Excel Spreadsheets in Computing Grades
Use of Excel Spreadsheets in Computing GradesUse of Excel Spreadsheets in Computing Grades
Use of Excel Spreadsheets in Computing Grades
 
VLOOKUP Function - Marelen Talavera - Vivacious Analytic
VLOOKUP Function - Marelen Talavera - Vivacious AnalyticVLOOKUP Function - Marelen Talavera - Vivacious Analytic
VLOOKUP Function - Marelen Talavera - Vivacious Analytic
 
Vlookup - an introduction
Vlookup - an introductionVlookup - an introduction
Vlookup - an introduction
 
EXCEL PRIMER
EXCEL PRIMEREXCEL PRIMER
EXCEL PRIMER
 
Cliff tip indexmatch_01
Cliff tip indexmatch_01Cliff tip indexmatch_01
Cliff tip indexmatch_01
 
Rick Watkins Docs
Rick Watkins DocsRick Watkins Docs
Rick Watkins Docs
 
joins and subqueries in big data analysis
joins and subqueries in big data analysisjoins and subqueries in big data analysis
joins and subqueries in big data analysis
 
Using Excel Functions
Using Excel FunctionsUsing Excel Functions
Using Excel Functions
 
Sumif () ppt
Sumif () pptSumif () ppt
Sumif () ppt
 
Types Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql ServerTypes Of Join In Sql Server - Join With Example In Sql Server
Types Of Join In Sql Server - Join With Example In Sql Server
 
App C
App CApp C
App C
 
V19 join method-c
V19 join method-cV19 join method-c
V19 join method-c
 
Spreadhsheets 1
Spreadhsheets 1Spreadhsheets 1
Spreadhsheets 1
 
Excel Tutorials - VLOOKUP and HLOOKUP Functions
Excel Tutorials - VLOOKUP and HLOOKUP FunctionsExcel Tutorials - VLOOKUP and HLOOKUP Functions
Excel Tutorials - VLOOKUP and HLOOKUP Functions
 
Sql join
Sql  joinSql  join
Sql join
 

Semelhante a Beier hints

Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
paulguerin
 
MYSQL
MYSQLMYSQL
MYSQL
ARJUN
 
1 Week 4 What Well Be Working on This Week B.docx
1 Week 4 What Well Be Working on This Week     B.docx1 Week 4 What Well Be Working on This Week     B.docx
1 Week 4 What Well Be Working on This Week B.docx
dorishigh
 
Internal tables
Internal tablesInternal tables
Internal tables
waseem27
 

Semelhante a Beier hints (20)

Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 
Indexing Strategies
Indexing StrategiesIndexing Strategies
Indexing Strategies
 
hashing.pdf
hashing.pdfhashing.pdf
hashing.pdf
 
ADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASADADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASAD
 
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
Views, Triggers, Functions, Stored Procedures,  Indexing and JoinsViews, Triggers, Functions, Stored Procedures,  Indexing and Joins
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
 
MULTIPLE TABLES
MULTIPLE TABLES MULTIPLE TABLES
MULTIPLE TABLES
 
Les12
Les12Les12
Les12
 
Mysql cheatsheet
Mysql cheatsheetMysql cheatsheet
Mysql cheatsheet
 
MYSQL
MYSQLMYSQL
MYSQL
 
9 - Advanced Functions in MS Excel.pptx
9 - Advanced Functions in MS Excel.pptx9 - Advanced Functions in MS Excel.pptx
9 - Advanced Functions in MS Excel.pptx
 
Mysql database
Mysql databaseMysql database
Mysql database
 
1 Week 4 What Well Be Working on This Week B.docx
1 Week 4 What Well Be Working on This Week     B.docx1 Week 4 What Well Be Working on This Week     B.docx
1 Week 4 What Well Be Working on This Week B.docx
 
Simple formulas excel
Simple formulas excelSimple formulas excel
Simple formulas excel
 
Hashing Technique In Data Structures
Hashing Technique In Data StructuresHashing Technique In Data Structures
Hashing Technique In Data Structures
 
Hira
HiraHira
Hira
 
Introduction to oracle optimizer
Introduction to oracle optimizerIntroduction to oracle optimizer
Introduction to oracle optimizer
 
Internal tables
Internal tablesInternal tables
Internal tables
 
ADBMS Unit-II c
ADBMS Unit-II cADBMS Unit-II c
ADBMS Unit-II c
 
SQLSERVERQUERIES.pptx
SQLSERVERQUERIES.pptxSQLSERVERQUERIES.pptx
SQLSERVERQUERIES.pptx
 
Chapter8 my sql revision tour
Chapter8 my sql revision tourChapter8 my sql revision tour
Chapter8 my sql revision tour
 

Mais de sreehari orienit

Oracle webcenter trainining in hyderabad
Oracle webcenter trainining in hyderabadOracle webcenter trainining in hyderabad
Oracle webcenter trainining in hyderabad
sreehari orienit
 
Oracle soa trainining in hyderabad
Oracle soa trainining in hyderabadOracle soa trainining in hyderabad
Oracle soa trainining in hyderabad
sreehari orienit
 
Oracle obiee trainining in hyderabad
Oracle obiee trainining in hyderabadOracle obiee trainining in hyderabad
Oracle obiee trainining in hyderabad
sreehari orienit
 
Oracleapps technical trainining in hyderabad
Oracleapps technical trainining in hyderabadOracleapps technical trainining in hyderabad
Oracleapps technical trainining in hyderabad
sreehari orienit
 
Oracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabadOracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabad
sreehari orienit
 
Oracle adf trainining in hyderabad
Oracle adf trainining in hyderabadOracle adf trainining in hyderabad
Oracle adf trainining in hyderabad
sreehari orienit
 
Hadoop training in hyderabad
Hadoop training in hyderabadHadoop training in hyderabad
Hadoop training in hyderabad
sreehari orienit
 
Oracle adf trainining in hyderabad
Oracle adf trainining in hyderabadOracle adf trainining in hyderabad
Oracle adf trainining in hyderabad
sreehari orienit
 

Mais de sreehari orienit (20)

Oracle dba trainining in hyderabad
Oracle dba trainining in hyderabadOracle dba trainining in hyderabad
Oracle dba trainining in hyderabad
 
Oracleapps scm trainining in hyderabad
Oracleapps scm trainining in hyderabadOracleapps scm trainining in hyderabad
Oracleapps scm trainining in hyderabad
 
Oracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabadOracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabad
 
Basic oracle-database-administration
Basic oracle-database-administrationBasic oracle-database-administration
Basic oracle-database-administration
 
Oracle adf-training-in-hyderabad
Oracle adf-training-in-hyderabadOracle adf-training-in-hyderabad
Oracle adf-training-in-hyderabad
 
Oracle training-in-hyderabad
Oracle training-in-hyderabadOracle training-in-hyderabad
Oracle training-in-hyderabad
 
Oracle adf-training-in-hyderabad
Oracle adf-training-in-hyderabadOracle adf-training-in-hyderabad
Oracle adf-training-in-hyderabad
 
Oracle training institutes in hyderabad
Oracle training institutes in hyderabadOracle training institutes in hyderabad
Oracle training institutes in hyderabad
 
Oracle webcenter trainining in hyderabad
Oracle webcenter trainining in hyderabadOracle webcenter trainining in hyderabad
Oracle webcenter trainining in hyderabad
 
Oracle soa trainining in hyderabad
Oracle soa trainining in hyderabadOracle soa trainining in hyderabad
Oracle soa trainining in hyderabad
 
Oracle obiee trainining in hyderabad
Oracle obiee trainining in hyderabadOracle obiee trainining in hyderabad
Oracle obiee trainining in hyderabad
 
Oracleapps technical trainining in hyderabad
Oracleapps technical trainining in hyderabadOracleapps technical trainining in hyderabad
Oracleapps technical trainining in hyderabad
 
Oracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabadOracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabad
 
Oracle adf trainining in hyderabad
Oracle adf trainining in hyderabadOracle adf trainining in hyderabad
Oracle adf trainining in hyderabad
 
Hadoop training in hyderabad
Hadoop training in hyderabadHadoop training in hyderabad
Hadoop training in hyderabad
 
Oracle institutes in Hyderabad.
Oracle  institutes in Hyderabad.Oracle  institutes in Hyderabad.
Oracle institutes in Hyderabad.
 
Oracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabadOracleapps finance trainining in hyderabad
Oracleapps finance trainining in hyderabad
 
Oracle adf trainining in hyderabad
Oracle adf trainining in hyderabadOracle adf trainining in hyderabad
Oracle adf trainining in hyderabad
 
Oracleapps scm trainining in hyderabad
Oracleapps scm trainining in hyderabadOracleapps scm trainining in hyderabad
Oracleapps scm trainining in hyderabad
 
Oracleapps hrms trainining in hyderabad
Oracleapps hrms trainining in hyderabadOracleapps hrms trainining in hyderabad
Oracleapps hrms trainining in hyderabad
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 

Beier hints

  • 2.  Hints give specific information that we know about our data and application.  A way to override the default query optimization in the DBMS  Influence the execution plan of query www.orienit.com
  • 3.  Oracle optimizer may not always choose the best execution plan  Using hints may improve the performance by changing the execution plan oracle takes. www.orienit.com
  • 4.  Hints can be used in the Select, Delete, and Update clauses.  In each statement, the hint goes directly after the Select, Delete, or Update keyword. A few hints use Insert.  Hints are placed in the /*+ */ tag, where the hint goes after the + sign  Ex: SELECT /*+ ALL_ROWS */ From… www.orienit.com
  • 5.  Approach hints  Access hints  Join hints  Misc. hints www.orienit.com
  • 6.  ALL_ROWS: Minimizes total resource consumption. Results will be returned only after all processing has been completed  FIRST_ROWS(n): Minimized response time, or minimal resource usage to return the first n rows. www.orienit.com
  • 7.  FULL(table): Chooses a full table scan for the table, even if there is an index available.  INDEX(table [index [index]...]): Chooses an Index scan for the table. www.orienit.com
  • 8.  CIS Department has far more males than females  SELECT /*+ FULL(s) */ id, name FROM Student s WHERE sex = ‘m’;  SELECT /*+ Index(s sex_index) */ id, name FROM Student s WHERE sex = ‘f’; www.orienit.com
  • 9.  ORDERED: tables are joined in the order in which they appear in the FROM clause.  LEADING(table): specified table is the first table used in the join order.  USE_HASH(table [table] …): Tables are joined using a hash join. Smaller table is used to make a hash table on join key. The larger table is scanned using hash table to find joined rows. www.orienit.com
  • 10.  USE_NL(table [table]…): Joins tables using nested loops join, using specified table as inner join. For every row in outer table, oracle accesses every row in inner table.  USE_MERGE(table [table]…): Joins tables using a sort-merge join. Sorted list are made and then merged together. Best if tables are already sorted. www.orienit.com
  • 11.  APPEND: Data is appended to the end of table, rather then using existing space.  CACHE(table): Blocks received are placed at the most recently used end of the LRU list in the buffer cache when a full table scan is preformed.  NOCACHE(table): Blocks received are placed at the least recently used end of the LRU list in the buffer cache. www.orienit.com
  • 12.  Oracle documentation at: http://oracle.cis.ksu.edu/oradocs/index.htm www.orienit.com