Jonathan Lewis EOUG Jun 2000 Execution Plans Agenda What are execution plans Where do you find execution plans Key mechanisms of execution Understanding.

Slides:



Advertisements
Similar presentations
Oracle 10g & 11g for Dev Virtual Columns DML error logging
Advertisements

Phoenix We put the SQL back in NoSQL James Taylor Demos:
1.
Tuning Oracle SQL The Basics of Efficient SQLThe Basics of Efficient SQL Common Sense Indexing The Optimizer –Making SQL Efficient Finding Problem Queries.
Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Presented By Akin S Walter-Johnson Ms Principal PeerLabs, Inc
Introduction to SQL Tuning Brown Bag Three essential concepts.
Optimizing and Simplifying Complex SQL with Advanced Grouping Presented by: Jared Still.
BACS 485—Database Management Advanced SQL Overview Advanced DDL, DML, and DCL Commands.
1Jonathan Lewis EOUG Jun 2000 Execution Plans Explain Plan - part 2 Parallel - Partitions - Problems.
Copyright  Oracle Corporation, All rights reserved. 4 Aggregating Data Using Group Functions.
What Happens when a SQL statement is issued?
6.830/6.814 Lecture 5 Database Internals Continued September 17, 2014.
1 Tuning with Oracle’s SQL Trace David Kurtz Go-Faster Consultancy Ltd.
1Eyad Alshareef Enhanced Guide to Oracle 10g Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data.
Agenda Overview of the optimizer How SQL is executed Identifying statements that need tuning Explain Plan Modifying the plan.
David Konopnicki Choosing Access Path ä The basic methods. ä The access paths and when they are available. ä How the optimizer chooses among the.
1 The Optimizer How ORACLE optimizes SQL statements David Konopnicky 1997, Revised by Mordo Shalom 2004.
Optimization Exercises. Question 1 How do you think the following query should be computed? What indexes would you suggest to use? SELECT E.ename, D.mgr.
AN INTRODUCTION TO EXECUTION PLAN OF QUERIES These slides have been adapted from a presentation originally made by ORACLE. The full set of original slides.
Relational Database Performance CSCI 6442 Copyright 2013, David C. Roberts, all rights reserved.
Executing Explain Plans and Explaining Execution Plans Craig Martin 01/20/2011.
A few things about the Optimizer Thomas Kyte
o At the end of this lesson, you will be able to:  Describe the life-cycle development phases  Discuss the theoretical and physical aspects of a relational.
Lecture 8 Index Organized Tables Clusters Index compression
Copyright  Oracle Corporation, All rights reserved. I Introduction.
Oracle Database Administration Lecture 6 Indexes, Optimizer, Hints.
4-1 Copyright  Oracle Corporation, All rights reserved. Data Manipulation Language (DML)
Ashwani Roy Understanding Graphical Execution Plans Level 200.
Michał Kwiatek – CERN /IT-DES Performance Optimization and Tuning 1 Data Management and Database Technologies Performance Optimization and Tuning Avoid.
Basic Optimization DB Workshop for LHC online/offline developers CERN January
11-1 Improve response time of interactive programs. Improve batch throughput. To ensure scalability of applications load vs. performance. Reduce system.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Cursors These slides are licensed under.
1 Information Retrieval and Use (IRU) CE An Introduction To SQL Part 1.
Joins & Sub-queries. Oracle recognizes that you may want data that resides in multiple tables drawn together in some meaningful way. One of the most important.
Copyright س Oracle Corporation, All rights reserved. I Introduction.
Star Transformations Tony Hasler, UKOUG Birmingham 2012 Tony Hasler, Anvil Computer Services Ltd.
SQL- DQL (Oracle Version). 2 SELECT Statement Syntax SELECT [DISTINCT] column_list FROM table_list [WHERE conditional expression] [GROUP BY column_list]
SQL Performance and Optimization l SQL Overview l Performance Tuning Process l SQL-Tuning –EXPLAIN PLANs –Tuning Tools –Optimizing Table Scans –Optimizing.
Session 2: SQL (A): Parts 1 and 2 Original materials supplied by the Oracle Academic Initiative (OAI). Edited for classroom use by Professor Laku Chidambaram.
1 Chapter 10 Joins and Subqueries. 2 Joins & Subqueries Joins – Methods to combine data from multiple tables – Optimizer information can be limited based.
Oracle tuning: a tutorial Saikat Chakraborty. Introduction In this session we will try to learn how to write optimized SQL statements in Oracle 8i We.
SQL SeQueL -Structured Query Language SQL SQL better support for Algebraic operations SQL Post-Relational row and column types,
Module 4 Database SQL Tuning Section 3 Application Performance.
I-1 Copyright س Oracle Corporation, All rights reserved. Data Retrieval.
1 Chapter 13 Parallel SQL. 2 Understanding Parallel SQL Enables a SQL statement to be: – Split into multiple threads – Each thread processed simultaneously.
1 Theory, Practice & Methodology of Relational Database Design and Programming Copyright © Ellis Cohen Subqueries These slides are licensed under.
1 Information Retrieval and Use (IRU) An Introduction To SQL Part 2.
9-1 © Prentice Hall, 2007 Topic 9: Physical Database Design Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Indexes … WHERE key = Table Index 22 Row pointer Key Indexes
Copyright س Oracle Corporation, All rights reserved. I Introduction.
10g Tuning Highlights Presenter JEREMY SCHNEIDER Senior Consultant, ITC Technology Services.
2-1 Limiting Rows Using a Selection “…retrieve all employees in department 10” EMP EMPNO ENAME JOB... DEPTNO 7839KINGPRESIDENT BLAKEMANAGER CLARKMANAGER.
David Konopnicki –1997, Rev. MS Optimizing Join Statements To choose an execution plan for a join statement, the optimizer must choose: ä Access.
DB Tuning : Chapter 10. Optimizer Center for E-Business Technology Seoul National University Seoul, Korea 이상근 Intelligent Database Systems Lab School of.
1 Presentation Outline SQL Writing Process SQL Standards Using Indexes The Optimizer FROM, WHERE Clauses EXPLAIN SQL Trace Sub-Selects and Joins Tips and.
Optimization and Administartion of a Database Management Systems Krystian Zieja.
Oracle9i Developer: PL/SQL Programming Chapter 11 Performance Tuning.
LAB: Web-scale Data Management on a Cloud Lab 11. Query Execution Plan 2011/05/27.
Defining a Column Alias
Diving into Query Execution Plans ED POLLACK AUTOTASK CORPORATION DATABASE OPTIMIZATION ENGINEER.
Communicating with a RDBMS Using SQL Database SQL> SELECT loc 2 FROM dept; SQL> SELECT loc 2 FROM dept; SQL statement is entered Statement is sent to database.
Tuning Oracle SQL The Basics of Efficient SQL Common Sense Indexing
SQL Server Statistics and its relationship with Query Optimizer
Choosing Access Path The basic methods.
Interpreting Execution Plans
Physical Join Operators
جملة الاستعلام الأساسية
Copyright © Ellis Cohen
Database Programming Using Oracle 11g
Presentation transcript:

Jonathan Lewis EOUG Jun 2000 Execution Plans Agenda What are execution plans Where do you find execution plans Key mechanisms of execution Understanding a complex plan Conclusion

Jonathan Lewis EOUG Jun 2000 Execution Plans What are execution plans Show me all clients accounts which are holding at least one position andhave no unsettled positions

Jonathan Lewis EOUG Jun 2000 Execution Plans What are execution plans Select * from accounts a where exists (select null from holdings h1 where h1.account = a.account and av_qty != 0 ) and not exists (select null from holdings h2 where h2.account = a.acount and unset_qty = 0 )

Jonathan Lewis EOUG Jun 2000 Execution Plans What are execution plans SELECT STATEMENT FILTER TABLE ACCESS FULL ACCOUNT TABLE ACCESS BY ROWID HOLDING INDEX RANGE SCAN HOLD_IX1 NON-UNIQUE TABLE ACCESS BY ROWID HOLDING INDEX RANGE SCAN HOLD_IX1 NON-UNIQUE

Execution Plans Where do plans come from ? selectep1.v1, ep2.v2, ep3.n2 fromep3,ep2,ep1 where( ep3.v1 = 'TV Region1' orep3.v2 = 'Newspaper2' ) andep2.n1 = ep3.n1 andep2.n2 = ep3.n2 andep1.n1 = ep2.n1;

Jonathan Lewis EOUG Jun 2000 Execution Plans Autotrace SQL*Plus set autotrace on set autotrace on explain set autotrace traceonly explain set autotrace traceonly statistics

Execution Plans Autotrace 0 SELECT STATEMENT Optimizer=FIRST_ROWS (c,c,b) 1 0 HASH JOIN (c,c,b) 2 1 TABLE ACCESS (FULL) OF 'EP1' (c,c,b) 3 1 NESTED LOOPS (c,c,b) 4 3 TABLE ACCESS (BY INDEX ROWID) OF 'EP3' (c,c,b) 5 4 BITMAP CONVERSION (TO ROWIDS) 6 5 BITMAP OR 7 6 BITMAP INDEX (SINGLE VALUE) OF 'EP3_BI1' 8 6 BITMAP INDEX (SINGLE VALUE) OF 'EP3_BI2' 9 3 TABLE ACCESS (BY INDEX ROWID) OF 'EP2' (c,c,b) 10 9 INDEX (UNIQUE SCAN) OF 'EP2_PK' (UNIQUE)

Jonathan Lewis EOUG Jun 2000 Execution Plans Explain Plan explain plan set statement_id = userenv(‘sessionid’) for sql_statement; select from plan_table start with connect by order by

Execution Plans Explain Plan SELECT STATEMENT (first_rows) (c,c,b) HASH JOIN (c,c,b) TABLE ACCESS (analyzed) EP1 (full) (c,c,b) NESTED LOOPS (c,c,b) TABLE ACCESS (analyzed) EP3 (by index rowid) (c,c,b) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) (c,c,b) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Jonathan Lewis EOUG Jun 2000 Execution Plans tkprof alter session set sql_trace true; tkprof {file stem} {file stem}\ explain=userid/password\ sort=\(options\)

Execution Plans tkprof (1) 301HASH JOIN 200 TABLE ACCESS FULL EP1 303 NESTED LOOPS 304 TABLE ACCESS BY INDEX ROWID EP3 304 BITMAP CONVERSION TO ROWIDS 2 BITMAP OR 2 BITMAP INDEX SINGLE VALUE 303 TABLE ACCESS BY INDEX ROWID EP2 606 INDEX UNIQUE SCAN (object id 21464)

Execution Plans tkprof (2) 0SELECT STATEMENT GOAL: HINT: FIRST_ROWS 301 HASH JOIN 200 TABLE ACCESS GOAL: ANALYZED (FULL) OF 'EP1' 303 NESTED LOOPS 304 TABLE ACCESS GOAL: ANA (BY IND RID) OF 'EP3' 304 BITMAP CONVERSION (TO ROWIDS) 2 BITMAP OR 2 BITMAP INDEX (SINGLE VALUE) OF 'EP3_BI1' 2 BITMAP INDEX (SINGLE VALUE) OF 'EP3_BI2' 303 TABLE ACCESS GOAL: ANA (BY IND RID) OF 'EP2' 606 INDEX GOAL: ANA (UNIQ SC) OF 'EP2_PK' (UNIQ)

Execution Plans Trace file id=1 cnt=301 pid=0 pos=0 obj=0 op='HASH JOIN ' id=2 cnt=200 pid=1 pos=1 obj=21461 op='TABLE ACCESS FULL EP1 ' id=3 cnt=303 pid=1 pos=2 obj=0 op='NESTED LOOPS ' id=4 cnt=304 pid=3 pos=1 obj=21465 op='TABLE ACCESS BY IND RID EP3 ' id=5 cnt=304 pid=4 pos=1 obj=0 op='BITMAP CONVERSION TO ROWIDS ' id=6 cnt=2 pid=5 pos=1 obj=0 op='BITMAP OR ' id=7 cnt=2 pid=6 pos=1 obj=21466 op='BITMAP INDEX SINGLE VALUE ' id=8 cnt=2 pid=6 pos=2 obj=21467 op='BITMAP INDEX SINGLE VALUE ' id=9 cnt=303 pid=3 pos=2 obj=21463 op='TABLE ACCESS BY IND RID EP2 ' id=10 cnt=606 pid=9 pos=1 obj=21464 op='INDEX UNIQUE SCAN '

Jonathan Lewis EOUG Jun 2000 Execution Plans Key mechanisms of execution Data access methods Data manipulation methods

Jonathan Lewis EOUG Jun 2000 Execution Plans Data access select * from dept where dname = 'SALES'; TABLE ACCESS FULL DEPT

Jonathan Lewis EOUG Jun 2000 Execution Plans Data access select empno from emp where mgr = 7698; INDEX RANGE SCAN NON-UNIQUE EMP_FK_MGR The index is (mgr,empno)

Jonathan Lewis EOUG Jun 2000 Execution Plans Parent and Child select * from dept where deptno = 10; IdPidPlan 10TABLE ACCESS BY ROWID DEPT 21 INDEX UNIQUE SCAN UNIQUE DPT_PK

Jonathan Lewis EOUG Jun 2000 Execution Plans Parent, child, and grandchild select * from emp where deptno = 10; IdPidPlan 10TABLE ACCESS BY ROWID EMP 21 BITMAP CONVERSION TO ROWIDS 32 BITMAP INDEX SINGLE VALUE EMP_FK_DPT

Jonathan Lewis EOUG Jun 2000 Execution Plans Parent with two children select* fromemp wherejob='SALESMAN' andsal=1250; IdPidPos Plan 101 TABLE ACCESS BY ROWID EMP 211 AND-EQUAL 321 INDEX RANGE SCAN NON-UNIQUE EMP_JOB 422 INDEX RANGE SCAN NON-UNIQUE EMP_SAL

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select max(sal),count(*) from emp; SORT AGGREGATE TABLE ACCESS FULL EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select deptno,max(sal) from emp group by deptno; SORT GROUP BY TABLE ACCESS FULL EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select deptno,max(sal) from emp group by deptno; SORT GROUP BY (NOSORT) TABLE ACCESS BY ROWID EMP INDEX RANGE SCAN NON-UNIQUE EMP_FK_DP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select max(empno) from emp where mgr = 7698; The index is emp_fk_mgr (mgr,empno) sort (aggregate) first row index (range scan (min/max)) of emp_fk_mgr

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select deptno,max(sal) from emp group by deptno having max(sal) > 3000; FILTER SORT GROUP BY TABLE ACCESS FULL EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select mgr,count(*) from emp where job = 'SALESMAN' group by mgr order by count(*) desc; SORT ORDER BY SORT GROUP BY TABLE ACCESS BY ROWID EMP INDEX RANGE SCAN NON-UNIQUE EMP_FK_JOB

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select * from emp where job='SALESMAN' or deptno = 10; CONCATENATION TABLE ACCESS BY ROWID EMP BITMAP CONVERSION TO ROWIDS BITMAP INDEX SINGLE VALUE EMP_FK_DPT TABLE ACCESS BY ROWID EMP INDEX RANGE SCAN NON-UNIQUE EMP_FK_JOB

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select * from emp where job='SALESMAN' or deptno = 10; CONCATENATION TABLE ACCESS BY ROWID EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select * from emp where job='SALESMAN' or deptno = 10; CONCATENATION TABLE ACCESS BY ROWID EMP BITMAP CONVERSION TO ROWIDS BITMAP INDEX SINGLE VALUE EMP_FK_DPT TABLE ACCESS BY ROWID EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select * from emp where job='SALESMAN' or deptno = 10; CONCATENATION TABLE ACCESS BY ROWID EMP TABLE ACCESS BY ROWID EMP INDEX RANGE SCAN NON-UNIQUE EMP_FK_JOB

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select * from emp where job='SALESMAN' or deptno = 10; Id Pid Ps Plan CONCATENATION TABLE ACCESS BY ROWID EMP BITMAP CONVERSION TO ROWIDS BITMAP INDEX SINGLE VALUE EMP_FK_DPT TABLE ACCESS BY ROWID EMP INDEX RANGE SCAN NON-UNIQUE EMP_FK_JOB

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select * from emp where job='SALESMAN' or job = 'CLERK' INLIST ITERATOR TABLE ACCESS BY ROWID EMP INDEX RANGE SCAN NON-UNIQUE EMP_FK_JOB

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Data handling select * from emp where exists ( select null from projects prj where prj.empno = emp.empno and prj.date_completed is null ) FILTER TABLE ACCESS FULL EMP TABLE ACCESS BY ROWID PROJECTS INDEX RANGE SCAN NON-UNIQUE PRJ_FK_EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms: Joins Nested Loops Sort Merge Hash

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Nested Loop Nested Loops [The first set of data] [The second set of data]

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Nested Loop Nested Loops Table scan FULL the red pack Table scan FULL the blue pack

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Nested Loop Nested Loops Table access by rowid DEPT Index unique scan DPT_PK Table access by rowid EMP Index range scan EMP_FK_DPT

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Sort Merge Merge Join [The first sorted set of data] [The second sorted set of data]

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Sort Merge Merge Join Sort join Table access full DEPT Sort join Table access full EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Sort Merge Merge Join Index Range Scan DPT_IDX Sort join Table access full EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Hash Hash [The first set of data] [The second set of data]

Jonathan Lewis EOUG Jun 2000 Execution Plans Mechanisms:Hash Hash Table access FULL DEPT Table access FULL EMP

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Nested Loops [The first set of data] [The second set of data]

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Nested Loops Table access by rowid DEPT Index unique scan DPT_PK Table access by rowid EMP Index range scan EMP_FK_DPT

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Table access by rowid SALGRADE Index range scan SAL_PK

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Nested Loops Table access by rowid DEPT Index unique scan DPT_PK Table access by rowid EMP Index range scan EMP_FK_DPT Table access by rowid SALGRADE Index range scan SAL_PK

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Nested Loops Table access by rowid REGION Index unique scan REG_PK Table access by rowid DEPT Index unique scan DPT_FK_REG

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Nested Loops Table access by rowid REGION Index unique scan REG_PK Table access by rowid DEPT Index unique scan DPT_FK_REG Table access by rowid EMP Index range scan EMP_FK_DPT Table access by rowid SALGRADE Index range scan SAL_PK

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Hash [The first set of data] [The second set of data]

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Hash Table scan full Medium_table Table scan full Large_table

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Table scan full Small_table

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Hash Table scan full Medium_table Table scan full Large_table Table scan full Small_table

Jonathan Lewis EOUG Jun 2000 Execution Plans Understanding a complex plan Hash Table scan full Small_table Hash Table scan full Medium_table Table scan full Large_table

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan - top down SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan - Bottom up SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Execution Plans Explain Plan SELECT STATEMENT (first_rows) HASH JOIN TABLE ACCESS (analyzed) EP1 (full) NESTED LOOPS TABLE ACCESS (analyzed) EP3 (by index rowid) BITMAP CONVERSION (to rowids) BITMAP OR BITMAP INDEX EP3_BI1 (single value) BITMAP INDEX EP3_BI2 (single value) TABLE ACCESS (analyzed) EP2 (by index rowid) INDEX (analyzed) UNIQUE EP2_PK (unique scan)

Jonathan Lewis EOUG Jun 2000 Execution Plans Conclusion Execution plans are important How much effort do you take Break complex plans down