310 Views
July 16, 16
スライド概要
Slideshare移行 2023-08-10時点View : 8777 views
個人事業主/Love SQL/Tuning/DBエンジニア/JPOUG/Oracle ACE Pro/ex-AWS BigData Consultant/ex-DEC/Oracle,PostgreSQL,Aurora,Redshift,Athena,SCT,DMS,Glue/偶にNowPlaying♪垂れ流し/
2
3
4
5
5
6
✔ ✔ ✔ ✔ 7
8
9
10
10
10
11
12
12
| Operation | Name | Mem | Temp | ================================================= | SELECT STATEMENT | | | | | HASH JOIN | | 4M | 1G | | PARTITION RANGE SINGLE | | | | | TABLE ACCESS FULL | FOO | | | | TABLE ACCESS FULL | BAR | | | 12
| Operation | Name | Mem | Temp | ================================================= | SELECT STATEMENT | | | | | HASH JOIN | | 4M | 1G | | PARTITION RANGE SINGLE | | | | | TABLE ACCESS FULL | FOO | | | | TABLE ACCESS FULL | BAR | | | 12
13
13
| Operation | Name | Mem | ========================================== | SELECT STATEMENT | | | | HASH JOIN | | 250M| | PARTITION RANGE SINGLE | | | | TABLE ACCESS FULL | FOO | | | TABLE ACCESS FULL | BAR | | 13
| Operation | Name | Mem | ========================================== | SELECT STATEMENT | | | | HASH JOIN | | 250M| | PARTITION RANGE SINGLE | | | | TABLE ACCESS FULL | FOO | | | TABLE ACCESS FULL | BAR | | 13
----------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | ----------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 0 |00:00:01.05 | 20052 | | 1 | SORT ORDER BY | | 20 | 0 |00:00:01.05 | 20052 | |* 2 | TABLE ACCESS FULL| FOOBAR | 20 | 0 |00:00:01.05 | 20052 | ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | Writes | Used-Mem | Used-Tmp| ----------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 20000 |00:00:04.21 | 37325 | 17273 | | | | 1 | SORT ORDER BY | | 20000 | 20000 |00:00:04.21 | 37325 | 17273 | 71M (1)| 135K| |* 2 | TABLE ACCESS FULL| FOOBAR | 20000 | 20000 |00:00:01.25 | 20052 | 0 | | | ----------------------------------------------------------------------------------------------------------14
----------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | ----------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 0 |00:00:01.05 | 20052 | | 1 | SORT ORDER BY | | 20 | 0 |00:00:01.05 | 20052 | |* 2 | TABLE ACCESS FULL| FOOBAR | 20 | 0 |00:00:01.05 | 20052 | ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | Writes | Used-Mem | Used-Tmp| ----------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 20000 |00:00:04.21 | 37325 | 17273 | | | | 1 | SORT ORDER BY | | 20000 | 20000 |00:00:04.21 | 37325 | 17273 | 71M (1)| 135K| |* 2 | TABLE ACCESS FULL| FOOBAR | 20000 | 20000 |00:00:01.25 | 20052 | 0 | | | ----------------------------------------------------------------------------------------------------------14
----------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | ----------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 0 |00:00:01.05 | 20052 | | 1 | SORT ORDER BY | | 20 | 0 |00:00:01.05 | 20052 | |* 2 | TABLE ACCESS FULL| FOOBAR | 20 | 0 |00:00:01.05 | 20052 | ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | Writes | Used-Mem | Used-Tmp| ----------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 20000 |00:00:04.21 | 37325 | 17273 | | | | 1 | SORT ORDER BY | | 20000 | 20000 |00:00:04.21 | 37325 | 17273 | 71M (1)| 135K| |* 2 | TABLE ACCESS FULL| FOOBAR | 20000 | 20000 |00:00:01.25 | 20052 | 0 | | | ----------------------------------------------------------------------------------------------------------14
----------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | ----------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 0 |00:00:01.05 | 20052 | | 1 | SORT ORDER BY | | 20 | 0 |00:00:01.05 | 20052 | |* 2 | TABLE ACCESS FULL| FOOBAR | 20 | 0 |00:00:01.05 | 20052 | ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | Writes | Used-Mem | Used-Tmp| ----------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 20000 |00:00:04.21 | 37325 | 17273 | | | | 1 | SORT ORDER BY | | 20000 | 20000 |00:00:04.21 | 37325 | 17273 | 71M (1)| 135K| |* 2 | TABLE ACCESS FULL| FOOBAR | 20000 | 20000 |00:00:01.25 | 20052 | 0 | | | ----------------------------------------------------------------------------------------------------------14
----------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | ----------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 0 |00:00:01.05 | 20052 | | 1 | SORT ORDER BY | | 20 | 0 |00:00:01.05 | 20052 | |* 2 | TABLE ACCESS FULL| FOOBAR | 20 | 0 |00:00:01.05 | 20052 | ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | Writes | Used-Mem | Used-Tmp| ----------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 20000 |00:00:04.21 | 37325 | 17273 | | | | 1 | SORT ORDER BY | | 20000 | 20000 |00:00:04.21 | 37325 | 17273 | 71M (1)| 135K| |* 2 | TABLE ACCESS FULL| FOOBAR | 20000 | 20000 |00:00:01.25 | 20052 | 0 | | | ----------------------------------------------------------------------------------------------------------14
----------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | ----------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 0 |00:00:01.05 | 20052 | | 1 | SORT ORDER BY | | 20 | 0 |00:00:01.05 | 20052 | |* 2 | TABLE ACCESS FULL| FOOBAR | 20 | 0 |00:00:01.05 | 20052 | ----------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------| Id | Operation | Name | E-Rows | A-Rows | A-Time | Reads | Writes | Used-Mem | Used-Tmp| ----------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | 20000 |00:00:04.21 | 37325 | 17273 | | | | 1 | SORT ORDER BY | | 20000 | 20000 |00:00:04.21 | 37325 | 17273 | 71M (1)| 135K| |* 2 | TABLE ACCESS FULL| FOOBAR | 20000 | 20000 |00:00:01.25 | 20052 | 0 | | | ----------------------------------------------------------------------------------------------------------14
========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
=============================================================================================================== | 0 | SELECT STATEMENT | | 2 | 1 | 0 | | | | 1 | HASH JOIN | | 3 | 1 | 0 | 100.00 | direct path write temp (3) | | 2 | TABLE ACCESS FULL | FOOBAR | 2 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | | 1 | | | | =============================================================================================================== ========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
=============================================================================================================== | 0 | SELECT STATEMENT | | 2 | 1 | 0 | | | | 1 | HASH JOIN | | 3 | 1 | 0 | 100.00 | direct path write temp (3) | | 2 | TABLE ACCESS FULL | FOOBAR | 2 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | | 1 | | | | =============================================================================================================== ========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
=============================================================================================================== | 0 | SELECT STATEMENT | | 2 | 1 | 0 | | | | 1 | HASH JOIN | | 3 | 1 | 0 | 100.00 | direct path write temp (3) | | 2 | TABLE ACCESS FULL | FOOBAR | 2 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | | 1 | | | | =============================================================================================================== ========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
============================================================================================================== | Id | Operation | Name | Time | Execs | Rows | Activity | Activity Detail | | | | | Active(s) | | (Actual) | (%) | (# samples) | ============================================================================================================== | 0 | SELECT STATEMENT | | 229 | 1 | 400K | 25.00 | Cpu (2) | | 1 | HASH JOIN | | 229 | 1 | 400K | 50.00 | Cpu (3) | | | | | | | | | direct path read temp (1) | | 2 | TABLE ACCESS FULL | FOOBAR | 3 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 107 | 1 | 20000 | 12.50 | Cpu (1) | ============================================================================================================== =============================================================================================================== | 0 | SELECT STATEMENT | | 2 | 1 | 0 | | | | 1 | HASH JOIN | | 3 | 1 | 0 | 100.00 | direct path write temp (3) | | 2 | TABLE ACCESS FULL | FOOBAR | 2 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | | 1 | | | | =============================================================================================================== ========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
============================================================================================================== | Id | Operation | Name | Time | Execs | Rows | Activity | Activity Detail | | | | | Active(s) | | (Actual) | (%) | (# samples) | ============================================================================================================== | 0 | SELECT STATEMENT | | 229 | 1 | 400K | 25.00 | Cpu (2) | | 1 | HASH JOIN | | 229 | 1 | 400K | 50.00 | Cpu (3) | | | | | | | | | direct path read temp (1) | | 2 | TABLE ACCESS FULL | FOOBAR | 3 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 107 | 1 | 20000 | 12.50 | Cpu (1) | ============================================================================================================== =============================================================================================================== | 0 | SELECT STATEMENT | | 2 | 1 | 0 | | | | 1 | HASH JOIN | | 3 | 1 | 0 | 100.00 | direct path write temp (3) | | 2 | TABLE ACCESS FULL | FOOBAR | 2 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | | 1 | | | | =============================================================================================================== ========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
============================================================================================================== | Id | Operation | Name | Time | Execs | Rows | Activity | Activity Detail | | | | | Active(s) | | (Actual) | (%) | (# samples) | ============================================================================================================== | 0 | SELECT STATEMENT | | 229 | 1 | 400K | 25.00 | Cpu (2) | | 1 | HASH JOIN | | 229 | 1 | 400K | 50.00 | Cpu (3) | | | | | | | | | direct path read temp (1) | | 2 | TABLE ACCESS FULL | FOOBAR | 3 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 107 | 1 | 20000 | 12.50 | Cpu (1) | ============================================================================================================== =============================================================================================================== | 0 | SELECT STATEMENT | | 2 | 1 | 0 | | | | 1 | HASH JOIN | | 3 | 1 | 0 | 100.00 | direct path write temp (3) | | 2 | TABLE ACCESS FULL | FOOBAR | 2 | 1 | 20000 | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | | 1 | | | | =============================================================================================================== ========================================================================================================= | 0 | SELECT STATEMENT | | | 1 | | | | | 1 | HASH JOIN | | | 1 | | | | | 2 | TABLE ACCESS FULL | FOOBAR | 1 | 1 | 0 | 100.00 | direct path read (1) | | 3 | TABLE ACCESS FULL | HOGEHOGE | | | | | | ========================================================================================================= 15
ID COUNT(1) ---------- ---------1 2000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 20000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 20 20 20 20 20 20 940 912 930 885 906 925 16 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20
ID COUNT(1) ---------- ---------1 2000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 20000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 20 20 20 20 20 20 940 912 930 885 906 925 16 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20
ID COUNT(1) ---------- ---------1 2000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 20000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 20 20 20 20 20 20 940 912 930 885 906 925 16 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20
ID COUNT(1) ---------- ---------1 2000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 20000 25 20 22 20 34 20 30 20 940 912 930 885 906 925 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 20 20 20 20 20 20 940 912 930 885 906 925 16 20 20 20 20 20 20 ID COUNT(1) ---------- ---------1 2 25 20 22 20 34 20 30 20 940 912 930 885 906 925 20 20 20 20 20 20
=================================================================================================================== | Id | Operation | Name | Rows | Time | Rows | Mem | Activity | Activity Detail | | | | | (Estim) | Active(s) | (Actual) | (Max) | (%) | (# samples) | =================================================================================================================== | 0 | SELECT STATEMENT | | | 225 | 400K | | 75.00 | Cpu (3) | | 1 | HASH JOIN | | 401K | 225 | 400K | 17M | | | | 2 | TABLE ACCESS FULL | FOOBAR | 2000 | 1 | 2000 | | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 20291 | 225 | 20000 | | 25.00 | direct path read (1) | =================================================================================================================== =================================================================================================================== | 0 | SELECT STATEMENT | | | 1 | 4 | | | | | 1 | HASH JOIN | | 23 | 1 | 4 | 458K | | | | 2 | TABLE ACCESS FULL | FOOBAR | 20 | 1 | 2 | | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 313 | 1 | 2 | | 100.00 | direct path read (1) | =================================================================================================================== 17
=================================================================================================================== | Id | Operation | Name | Rows | Time | Rows | Mem | Activity | Activity Detail | | | | | (Estim) | Active(s) | (Actual) | (Max) | (%) | (# samples) | =================================================================================================================== | 0 | SELECT STATEMENT | | | 225 | 400K | | 75.00 | Cpu (3) | | 1 | HASH JOIN | | 401K | 225 | 400K | 17M | | | | 2 | TABLE ACCESS FULL | FOOBAR | 2000 | 1 | 2000 | | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 20291 | 225 | 20000 | | 25.00 | direct path read (1) | =================================================================================================================== =================================================================================================================== | 0 | SELECT STATEMENT | | | 1 | 4 | | | | | 1 | HASH JOIN | | 23 | 1 | 4 | 458K | | | | 2 | TABLE ACCESS FULL | FOOBAR | 20 | 1 | 2 | | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 313 | 1 | 2 | | 100.00 | direct path read (1) | =================================================================================================================== 17
=================================================================================================================== | Id | Operation | Name | Rows | Time | Rows | Mem | Activity | Activity Detail | | | | | (Estim) | Active(s) | (Actual) | (Max) | (%) | (# samples) | =================================================================================================================== | 0 | SELECT STATEMENT | | | 225 | 400K | | 75.00 | Cpu (3) | | 1 | HASH JOIN | | 401K | 225 | 400K | 17M | | | | 2 | TABLE ACCESS FULL | FOOBAR | 2000 | 1 | 2000 | | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 20291 | 225 | 20000 | | 25.00 | direct path read (1) | =================================================================================================================== =================================================================================================================== | 0 | SELECT STATEMENT | | | 1 | 4 | | | | | 1 | HASH JOIN | | 23 | 1 | 4 | 458K | | | | 2 | TABLE ACCESS FULL | FOOBAR | 20 | 1 | 2 | | | | | 3 | TABLE ACCESS FULL | HOGEHOGE | 313 | 1 | 2 | | 100.00 | direct path read (1) | =================================================================================================================== 17
18
ID ---------2 4 5 3 1 8 9 10 11 12 COL1 -----------------------------****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** COL2 -------------************** ************** ************** ************** ************** ************** ************** ************** ************** ************** 18
ID ---------2 4 5 3 1 8 9 10 11 12 COL1 -----------------------------****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** COL2 -------------************** ************** ************** ************** ************** ************** ************** ************** ************** ************** 18
ID ---------2 4 5 3 1 8 9 10 11 12 COL1 -----------------------------****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** ****************************** COL2 -------------************** ************** ************** ************** ************** ************** ************** ************** ************** ************** 18
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE SEGMENT_NAME SUM(BLOCKS) MB ----------------- ----------- ---------SMALL_SEGMENTSIZE 8 .0625 TABLE_NAME ----------------SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 3 1 NONE DATA2 0 1 1 6 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE SEGMENT_NAME SUM(BLOCKS) MB ----------------- ----------- ---------SMALL_SEGMENTSIZE 8 .0625 TABLE_NAME ----------------SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 3 1 NONE DATA2 0 1 1 6 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE SEGMENT_NAME SUM(BLOCKS) MB ----------------- ----------- ---------SMALL_SEGMENTSIZE 8 .0625 TABLE_NAME ----------------SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 3 1 NONE DATA2 0 1 1 6 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE SEGMENT_NAME SUM(BLOCKS) MB ----------------- ----------- ---------SMALL_SEGMENTSIZE 8 .0625 TABLE_NAME ----------------SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 3 1 NONE DATA2 0 1 1 6 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE SEGMENT_NAME SUM(BLOCKS) MB ----------------- ----------- ---------SMALL_SEGMENTSIZE 8 .0625 TABLE_NAME ----------------SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 3 1 NONE DATA2 0 1 1 6 1 NONE 19
SEGMENT_NAME SUM(BLOCKS) MB ------------- ----------- ---------SEGMENTSIZE 1024 8 TABLE_NAME ------------SEGMENTSIZE SEGMENTSIZE SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 4001 1 NONE DATA2 0 1 1 3001 1 NONE SEGMENT_NAME SUM(BLOCKS) MB ----------------- ----------- ---------SMALL_SEGMENTSIZE 8 .0625 TABLE_NAME ----------------SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE SMALL_SEGMENTSIZE COLUMN_NAME NUM_NULLS NUM_DISTINCT DENSITY AVG_COL_LEN NUM_BUCKETS HISTOGRAM ------------ --------- ------------ ---------- ----------- ----------- ---------ID 0 1000 .001 4 1 NONE DATA1 0 1 1 3 1 NONE DATA2 0 1 1 6 1 NONE 19
============================================================================== | Id | Operation | Name | Rows | Rows | Read | Read | | | | | (Estim) | (Actual) | Reqs | Bytes | ============================================================================== | 0 | SELECT STATEMENT | | | 1000 | | | | 1 | TABLE ACCESS FULL | SEGMENTSIZE | 1000 | 1000 | 37 | 8MB | ============================================================================== ==================================================================================== | Id | Operation | Name | Rows | Rows | Read | Read | | | | | (Estim) | (Actual) | Reqs | Bytes | ==================================================================================== | 0 | SELECT STATEMENT | | | 1000 | | | | 1 | TABLE ACCESS FULL | SMALL_SEGMENTSIZE | 1000 | 1000 | 2 | 32768 | ==================================================================================== 20
21
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------22
✋ Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------23
✋ Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------24
✋ Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT UNIQUENES STATEMENT | | 1 | | INDEX_NAME DISTINCT_KEYS CLUSTERING_FACTOR |* 1 | FILTER--------- ------------| | 1 | | -------------------------| 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | PK_FOO UNIQUE 20000 19993 |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 可能性が高い -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------24
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------25
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------25
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------25
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------26
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------26
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------26
Plan hash value: 3426918692 ----------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows | ----------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | |* 1 | FILTER | | 1 | | | 2 | TABLE ACCESS BY INDEX ROWID| FOO | 1 | 50 | |* 3 | INDEX RANGE SCAN | PK_FOO | 1 | 50 | ----------------------------------------------------------------Plan hash value: 2962421549 -------------------------------------------------------------| Id | Operation | Name | Starts | E-Rows |E-Bytes| -------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 | | | | 1 | SORT ORDER BY | | 1 | 5000 | 2485K| |* 2 | FILTER | | 1 | | | |* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------27
✋ 28
INDEX_NAME CLUSTERING_FACTOR NUM_OF_TABLE_BLOCKS NUM_OF_TABLE_ROWS ----------- ----------------- ------------------- ----------------PK_HICLS 992 80 1000 PK_LOCLS 72 80 1000 29
INDEX_NAME CLUSTERING_FACTOR NUM_OF_TABLE_BLOCKS NUM_OF_TABLE_ROWS ----------- ----------------- ------------------- ----------------PK_HICLS 992 80 1000 PK_LOCLS 72 80 1000 29
INDEX_NAME CLUSTERING_FACTOR NUM_OF_TABLE_BLOCKS NUM_OF_TABLE_ROWS ----------- ----------------- ------------------- ----------------PK_HICLS 992 80 1000 PK_LOCLS 72 80 1000 29
30
Plan hash value: 2962421549 -------------------------------------------------------------hash value: 2962421549 | Id Plan | Operation | Name | Starts | E-Rows |E-Bytes| --------------------------------------------------------------------------------------------------------------------------| Operation | Name | Starts | E-Rows |E-Bytes| | 0| |IdSELECT STATEMENT | | 1 | | | -------------------------------------------------------------| 1 | SORT ORDER BY | | 1 | 5000 | 2485K| | 0 | SELECT STATEMENT | | 1 | | | |* 2 | FILTER | | 1 | | | SORTACCESS ORDER FULL| BY | 1 | 1 5000 | 5000 | 2485K| |* 3| | 1 |TABLE FOO| | | 2485K| |* 2 | FILTER | | 1 | | | -------------------------------------------------------------|* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------- 31
32
Plan Hash # Value Executions --- ---------------- -------------1 1885085827 2000 2 1756993664 2000 3 3400946141 2000 4 13177233 2000 5 3564047035 2000 33
Plan Hash # Value Executions --- ---------------- -------------1 1885085827 2000 2 1756993664 2000 3 3400946141 2000 4 13177233 2000 5 3564047035 2000 33
34
|MERGE JOIN | | | TABLE ACCESS BY INDEX ROWID| FOO | | INDEX RANGE SCAN | PK_FOO | | SORT JOIN | | | TABLE ACCESS FULL | BAR | |NESTED LOOPS | | NESTED LOOPS | | TABLE ACCESS FULL | FOO | INDEX RANGE SCAN | PK_BAR | TABLE ACCESS BY INDEX ROWID| BAR |HASH JOIN | | TABLE ACCESS FULL| FOO | TABLE ACCESS FULL| BAR | | | | | |HASH JOIN | TABLE ACCESS | INDEX RANGE | TABLE ACCESS | INDEX RANGE |NESTED LOOPS | | | NESTED LOOPS | | | TABLE ACCESS BY INDEX ROWID BATCHED| FOO | | INDEX RANGE SCAN | PK_FOO | | INDEX RANGE SCAN | PK_BAR | | TABLE ACCESS BY INDEX ROWID | BAR | 34 | | | | BY INDEX ROWID BATCHED| SCAN | BY INDEX ROWID BATCHED| SCAN | FOO PK_FOO BAR PK_BAR
Plan hash value: 2962421549 -------------------------------------------------------------hash value: 2962421549 | Id Plan | Operation | Name | Starts | E-Rows |E-Bytes| --------------------------------------------------------------------------------------------------------------------------| Operation | Name | Starts | E-Rows |E-Bytes| | 0| |IdSELECT STATEMENT | | 1 | | | -------------------------------------------------------------| 1 | SORT ORDER BY | | 1 | 5000 | 2485K| | 0 | SELECT STATEMENT | | 1 | | | |* 2 | FILTER | | 1 | | | SORTACCESS ORDER FULL| BY | 1 | 1 5000 | 5000 | 2485K| |* 3| | 1 |TABLE FOO| | | 2485K| |* 2 | FILTER | | 1 | | | -------------------------------------------------------------|* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------- 35
Plan hash value: 2962421549 -------------------------------------------------------------hash value: 2962421549 | Id Plan | Operation | Name | Starts | E-Rows |E-Bytes| --------------------------------------------------------------------------------------------------------------------------| Operation | Name | Starts | E-Rows |E-Bytes| | 0| |IdSELECT STATEMENT | | 1 | | | -------------------------------------------------------------| 1 | SORT ORDER BY | | 1 | 5000 | 2485K| | 0 | SELECT STATEMENT | | 1 | | | |* 2 | FILTER | | 1 | | | SORTACCESS ORDER FULL| BY | 1 | 1 5000 | 5000 | 2485K| |* 3| | 1 |TABLE FOO| | | 2485K| |* 2 | FILTER | | 1 | | | -------------------------------------------------------------|* 3 | TABLE ACCESS FULL| FOO | 1 | 5000 | 2485K| -------------------------------------------------------------- 35
:v1 = 1 :v2 = 2120 :v3 = 2000 :v1 = 200 :v2 = 2300 :v3 = 2000 :v1 = 50 :v2 = 300 :v3 = 2000 :v1 = 15000 :v2 = 17400 :v3 = 2000 :v1 = x :v2 = x+300 :v3 = 2000 |HASH JOIN | | TABLE ACCESS FULL| FOO | TABLE ACCESS FULL| BAR |HASH JOIN | TABLE ACCESS | INDEX RANGE | TABLE ACCESS | INDEX RANGE | | | | BY INDEX ROWID BATCHED| SCAN | BY INDEX ROWID BATCHED| SCAN | FOO PK_FOO BAR PK_BAR |NESTED LOOPS | | | NESTED LOOPS | | | TABLE ACCESS BY INDEX ROWID BATCHED| FOO | | INDEX RANGE SCAN | PK_FOO | | INDEX RANGE SCAN | PK_BAR | | TABLE ACCESS BY INDEX ROWID | BAR | |NESTED LOOPS | | NESTED LOOPS | | TABLE ACCESS FULL | FOO | INDEX RANGE SCAN | PK_BAR | TABLE ACCESS BY INDEX ROWID| BAR | | | | | |MERGE JOIN | | | TABLE ACCESS BY INDEX ROWID| FOO | | INDEX RANGE SCAN | PK_FOO | | SORT JOIN | | | TABLE ACCESS FULL | BAR | 36
:v1 = 1 :v2 = 2120 :v3 = 2000 :v1 = 200 :v2 = 2300 :v3 = 2000 :v1 = 50 :v2 = 300 :v3 = 2000 :v1 = 15000 :v2 = 17400 :v3 = 2000 :v1 = x :v2 = x+300 :v3 = 2000 |HASH JOIN | | TABLE ACCESS FULL| FOO | TABLE ACCESS FULL| BAR |HASH JOIN | TABLE ACCESS | INDEX RANGE | TABLE ACCESS | INDEX RANGE | | | | BY INDEX ROWID BATCHED| SCAN | BY INDEX ROWID BATCHED| SCAN | FOO PK_FOO BAR PK_BAR |NESTED LOOPS | | | NESTED LOOPS | | | TABLE ACCESS BY INDEX ROWID BATCHED| FOO | | INDEX RANGE SCAN | PK_FOO | | INDEX RANGE SCAN | PK_BAR | | TABLE ACCESS BY INDEX ROWID | BAR | |NESTED LOOPS | | NESTED LOOPS | | TABLE ACCESS FULL | FOO | INDEX RANGE SCAN | PK_BAR | TABLE ACCESS BY INDEX ROWID| BAR | | | | | |MERGE JOIN | | | TABLE ACCESS BY INDEX ROWID| FOO | | INDEX RANGE SCAN | PK_FOO | | SORT JOIN | | | TABLE ACCESS FULL | BAR | 36
:v1 = 1 :v2 = 2120 :v3 = 2000 :v1 = 200 :v2 = 2300 :v3 = 2000 :v1 = 50 :v2 = 300 :v3 = 2000 :v1 = 15000 :v2 = 17400 :v3 = 2000 :v1 = x :v2 = x+300 :v3 = 2000 |HASH JOIN | | TABLE ACCESS FULL| FOO | TABLE ACCESS FULL| BAR |HASH JOIN | TABLE ACCESS | INDEX RANGE | TABLE ACCESS | INDEX RANGE | | | | BY INDEX ROWID BATCHED| SCAN | BY INDEX ROWID BATCHED| SCAN | FOO PK_FOO BAR PK_BAR |NESTED LOOPS | | | NESTED LOOPS | | | TABLE ACCESS BY INDEX ROWID BATCHED| FOO | | INDEX RANGE SCAN | PK_FOO | | INDEX RANGE SCAN | PK_BAR | | TABLE ACCESS BY INDEX ROWID | BAR | |NESTED LOOPS | | NESTED LOOPS | | TABLE ACCESS FULL | FOO | INDEX RANGE SCAN | PK_BAR | TABLE ACCESS BY INDEX ROWID| BAR | | | | | |MERGE JOIN | | | TABLE ACCESS BY INDEX ROWID| FOO | | INDEX RANGE SCAN | PK_FOO | | SORT JOIN | | | TABLE ACCESS FULL | BAR | 36
:v1 = 1 :v2 = 2120 :v3 = 2000 :v1 = 200 :v2 = 2300 :v3 = 2000 :v1 = 50 :v2 = 300 :v3 = 2000 |HASH JOIN | | TABLE ACCESS FULL| FOO | TABLE ACCESS FULL| BAR |HASH JOIN | TABLE ACCESS | INDEX RANGE | TABLE ACCESS | INDEX RANGE | | | | BY INDEX ROWID BATCHED| SCAN | BY INDEX ROWID BATCHED| SCAN | FOO PK_FOO BAR PK_BAR :v1 = 15000 :v2 = 17400 :v3 = 2000 |NESTED LOOPS | | | NESTED LOOPS | | | TABLE ACCESS BY INDEX ROWID BATCHED| FOO | | INDEX RANGE SCAN | PK_FOO | | INDEX RANGE SCAN | PK_BAR | | TABLE ACCESS BY INDEX ROWID | BAR | :v1 = x :v2 = x+300 :v3 = 2000 |NESTED LOOPS | | NESTED LOOPS | | TABLE ACCESS FULL | FOO | INDEX RANGE SCAN | PK_BAR | TABLE ACCESS BY INDEX ROWID| BAR | | | | | |MERGE JOIN | | | TABLE ACCESS BY INDEX ROWID| FOO | | INDEX RANGE SCAN | PK_FOO | | SORT JOIN | | | TABLE ACCESS FULL | BAR | 37
Plan Hash # Value Executions --- ---------------- ------------1 1756993664 2000 2 3400946141 2000 3 1885085827 2000 4 13177233 2000 5 3564047035 2000 Plan Hash # Value Executions --- ---------------- ------------1 3564047035 10,000 2 13177233 0 1 1 2 3 4 5 1756993664 3564047035 13177233 3400946141 1885085827 1 13177233 2004 5991 2000 4 1 10,000 38 3564047035 10,000
Plan Hash # Value Executions --- ---------------- ------------1 1756993664 2000 2 3400946141 2000 3 1885085827 2000 4 13177233 2000 5 3564047035 2000 Plan Hash # Value Executions --- ---------------- ------------1 3564047035 10,000 2 13177233 0 1 1 2 3 4 5 1756993664 3564047035 13177233 3400946141 1885085827 1 13177233 2004 5991 2000 4 1 10,000 38 3564047035 10,000
Plan Hash # Value Executions --- ---------------- ------------1 1756993664 2000 2 3400946141 2000 3 1885085827 2000 4 13177233 2000 5 3564047035 2000 Plan Hash # Value Executions --- ---------------- ------------1 3564047035 10,000 2 13177233 0 1 1 2 3 4 5 1756993664 3564047035 13177233 3400946141 1885085827 1 13177233 2004 5991 2000 4 1 10,000 38 3564047035 10,000
Plan Hash # Value Executions --- ---------------- ------------1 1756993664 2000 2 3400946141 2000 3 1885085827 2000 4 13177233 2000 5 3564047035 2000 Plan Hash # Value Executions --- ---------------- ------------1 3564047035 10,000 2 13177233 0 1 1 2 3 4 5 1756993664 3564047035 13177233 3400946141 1885085827 1 13177233 2004 5991 2000 4 1 10,000 38 3564047035 10,000
Plan Hash # Value Executions --- ---------------- ------------1 1756993664 2000 2 3400946141 2000 3 1885085827 2000 4 13177233 2000 5 3564047035 2000 Plan Hash # Value Executions --- ---------------- ------------1 3564047035 10,000 2 13177233 0 1 1 2 3 4 5 1756993664 3564047035 13177233 3400946141 1885085827 1 13177233 2004 5991 2000 4 1 10,000 38 3564047035 10,000
Plan Hash # Value Executions --- ---------------- ------------1 1756993664 2000 2 3400946141 2000 3 1885085827 2000 4 13177233 2000 5 3564047035 2000 Plan Hash # Value Executions --- ---------------- ------------1 3564047035 10,000 2 13177233 0 1 1 2 3 4 5 1756993664 3564047035 13177233 3400946141 1885085827 1 13177233 2004 5991 2000 4 1 10,000 38 3564047035 10,000
39
40
40
40
40
40
41
42
43
✔dba_sql_plan_dir_objects OWNER --------MDSYS MDSYS MDSYS MDSYS MDSYS SH SH SH OBJECT -----COLUMN COLUMN COLUMN COLUMN TABLE COLUMN COLUMN TABLE OBJECT_NAME --------------RDF_LINK$ RDF_LINK$ RDF_LINK$ RDF_LINK$ RDF_LINK$ PRODUCTS PRODUCTS PRODUCTS SUBOBJECT_NAME -----------------CANON_END_NODE_ID G_ID P_VALUE_ID START_NODE_ID PROD_CATEGORY PROD_ID ✔dba_sql_plan_directives; TYPE ---------------DYNAMIC_SAMPLING DYNAMIC_SAMPLING DYNAMIC_SAMPLING REASON -----------------------------------SINGLE TABLE CARDINALITY MISESTIMATE JOIN CARDINALITY MISESTIMATE GROUP BY CARDINALITY MISESTIMATE 43
43
44
45
CBO (Cost Base Optimizer) SQL Transformation (Join Elimination, View Merge, Vector Transform) Bind Peek Adaptive Cursor Sharing Statistics Feedback Dynamic Statistics Adaptive Plan SQL Plan Directives SQL Plan stability Management SQL Hints 46
CBO (Cost Base Optimizer) SQL Transformation (Join Elimination, View Merge, Vector Transform) Bind Peek Adaptive Cursor Sharing Statistics Feedback Dynamic Statistics Adaptive Plan SQL Plan Directives SQL Plan stability Management SQL Hints 46 ✌