Upload
hiroshi-sekiguchi
View
2.569
Download
0
Embed Size (px)
Citation preview
1
Operating System
Oracle Core
3
4
5
6
7
8
9
10
11
12
13
14
🔺
15
🔺
16
✖✖
17
18
19
20
21
22
~
23
24
25000行が選択されました。
実行計画-------------------------------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |-------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 25000 | 12M| 1841 (1)| 00:00:01 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| DELUDING_TAB | 25000 | 12M| 1841 (1)| 00:00:01 ||* 2 | INDEX RANGE SCAN | PK_DELUDING_TAB | 25000 | | 54 (0)| 00:00:01 |-------------------------------------------------------------------------------------------------------
30000行が選択されました。
実行計画----------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |----------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 30000 | 14M| 1947 (1)| 00:00:01 ||* 1 | TABLE ACCESS FULL| DELUDING_TAB | 30000 | 14M| 1947 (1)| 00:00:01 |----------------------------------------------------------------------------------
25
25000行が選択されました。
実行計画-------------------------------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |-------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 25000 | 12M| 1841 (1)| 00:00:01 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| DELUDING_TAB | 25000 | 12M| 1841 (1)| 00:00:01 ||* 2 | INDEX RANGE SCAN | PK_DELUDING_TAB | 25000 | | 54 (0)| 00:00:01 |-------------------------------------------------------------------------------------------------------
30000行が選択されました。
実行計画----------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |----------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 30000 | 14M| 1947 (1)| 00:00:01 ||* 1 | TABLE ACCESS FULL| DELUDING_TAB | 30000 | 14M| 1947 (1)| 00:00:01 |----------------------------------------------------------------------------------
26
2100行が選択されました。
実行計画--------------------------------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |--------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 2102 | 1077K| 2115 (0)| 00:00:01 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| DELUDING_TAB2 | 2102 | 1077K| 2115 (0)| 00:00:01 ||* 2 | INDEX RANGE SCAN | PK_DELUDING_TAB2 | 2102 | | 13 (0)| 00:00:01 |--------------------------------------------------------------------------------------------------------
2500行が選択されました。
実行計画-----------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |-----------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 2482 | 1272K| 2117 (1)| 00:00:01 ||* 1 | TABLE ACCESS FULL| DELUDING_TAB2 | 2482 | 1272K| 2117 (1)| 00:00:01 |-----------------------------------------------------------------------------------
27
2100行が選択されました。
実行計画--------------------------------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |--------------------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 2102 | 1077K| 2115 (0)| 00:00:01 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| DELUDING_TAB2 | 2102 | 1077K| 2115 (0)| 00:00:01 ||* 2 | INDEX RANGE SCAN | PK_DELUDING_TAB2 | 2102 | | 13 (0)| 00:00:01 |--------------------------------------------------------------------------------------------------------
2500行が選択されました。
実行計画-----------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |-----------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 2482 | 1272K| 2117 (1)| 00:00:01 ||* 1 | TABLE ACCESS FULL| DELUDING_TAB2 | 2482 | 1272K| 2117 (1)| 00:00:01 |-----------------------------------------------------------------------------------
28
INDEX_NAME CLUSTERING_FACTOR NUM_ROWS------------------------------ ----------------- ----------PK_DELUDING_TAB 7143 100000PK_DELUDING_TAB2 99990 100000
29
30
31
32
33
34
35
統計---------------------------------------------------------- 0 recursive calls 0 db block gets 107173 consistent gets
統計---------------------------------------------------------- 0 recursive calls 0 db block gets 13911 consistent gets
36
37
38
🔺
39
40
select * from bad_statistics_tab where status=リテラル値;
41
---------------------------------------------------------| Id | Operation | Name | Rows |--------------------------------------------------------| 0 | SELECT STATEMENT | | 99900 | |* 1 | TABLE ACCESS FULL| BAD_STATISTICS_TAB | 99900 | ----------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
1 - filter("STATUS"=0)
42
---------------------------------------------------------| Id | Operation | Name | Rows |--------------------------------------------------------| 0 | SELECT STATEMENT | | 99900 | |* 1 | TABLE ACCESS FULL| BAD_STATISTICS_TAB | 99900 | ----------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
1 - filter("STATUS"=0)
1 recursive calls 0 db block gets 20159 consistent gets 0 physical reads 0 redo size 2262529 bytes sent via SQL*Net to client 73800 bytes received via SQL*Net from client 6661 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 99900 rows processed
43
--------------------------------------------------------------------------| Id | Operation | Name | Rows |--------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| BAD_STATISTICS_TAB | 1 ||* 2 | INDEX RANGE SCAN | BAD_INDEX | 1 |--------------------------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
2 - access("STATUS"=1)
44
--------------------------------------------------------------------------| Id | Operation | Name | Rows |--------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| BAD_STATISTICS_TAB | 1 ||* 2 | INDEX RANGE SCAN | BAD_INDEX | 1 |--------------------------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
2 - access("STATUS"=1)
1 recursive calls 0 db block gets 35214 consistent gets 0 physical reads 674340 redo size 103579092 bytes sent via SQL*Net to client 73800 bytes received via SQL*Net from client 6661 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 99900 rows processed
45
--------------------------------------------------------------------------| Id | Operation | Name | Rows |--------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| BAD_STATISTICS_TAB | 1 ||* 2 | INDEX RANGE SCAN | BAD_INDEX | 1 |--------------------------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
2 - access("STATUS"=2)
46
--------------------------------------------------------------------------| Id | Operation | Name | Rows |--------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| BAD_STATISTICS_TAB | 1 ||* 2 | INDEX RANGE SCAN | BAD_INDEX | 1 |--------------------------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
2 - access("STATUS"=2)
1 recursive calls 0 db block gets 35215 consistent gets 0 physical reads 674340 redo size 103579092 bytes sent via SQL*Net to client 73800 bytes received via SQL*Net from client 6661 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 99900 rows processed
47
--------------------------------------------------------------------------| Id | Operation | Name | Rows |--------------------------------------------------------------------------| 0 | SELECT STATEMENT | | 1 || 1 | TABLE ACCESS BY INDEX ROWID BATCHED| BAD_STATISTICS_TAB | 1 ||* 2 | INDEX RANGE SCAN | BAD_INDEX | 1 |--------------------------------------------------------------------------
Predicate Information (identified by operation id):---------------------------------------------------
2 - access("STATUS"=2)
1 recursive calls 0 db block gets 35215 consistent gets 0 physical reads 674340 redo size 103579092 bytes sent via SQL*Net to client 73800 bytes received via SQL*Net from client 6661 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 99900 rows processed
48
49
🔺
50
🔺
51
52
---------------------------------------------------| Id | Operation | Name | Rows |---------------------------------------------------| 0 | SELECT STATEMENT | | 100K|| 1 | TABLE ACCESS FULL| DELUDING_TAB2 | 100K|---------------------------------------------------
統計-------------------------------------------------- 0 recursive calls 0 db block gets 13905 consistent gets 7742 physical reads 0 redo size 55292936 bytes sent via SQL*Net to client 73878 bytes received via SQL*Net from client 6668 SQL*Net roundtrips to/from client
53
============================================~==============================================| Id | Operation | Name |~| Activity | Activity Detail || | | |~| (%) | (# samples) |============================================~==============================================| 0 | SELECT STATEMENT | |~| 20.00 | Cpu (1) || 1 | TABLE ACCESS FULL | DELUDING_TAB2 |~| 80.00 | Cpu (1) || | | |~| | SQL*Net message to client (1) || | | |~| | SQL*Net more data to client (2) |============================================~==============================================
54
call count cpu elapsed disk query current rows------- ------ -------- ---------- ---------- ---------- ---------- ----------Parse 1 0.00 0.00 0 0 0 0Execute 1 0.00 0.00 0 0 0 0Fetch 6668 0.85 0.81 7742 13905 0 100000------- ------ -------- ---------- ---------- ---------- ---------- ----------total 6670 0.85 0.81 7742 13905 0 100000
Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to client 6668 0.00 0.14 direct path read 130 0.00 0.02 SQL*Net message from client 6668 0.01 8.17
55
56
統計-------------------------------------------------- 0 recursive calls 0 db block gets 13905 consistent gets 7742 physical reads 0 redo size 55292936 bytes sent via SQL*Net to client 73878 bytes received via SQL*Net from client 6668 SQL*Net roundtrips to/from client
0 recursive calls 0 db block gets 8367 consistent gets 7742 physical reads 0 redo size 54128936 bytes sent via SQL*Net to client 7878 bytes received via SQL*Net from client 668 SQL*Net roundtrips to/from client
57
============================================~==============================================| Id | Operation | Name |~| Activity | Activity Detail || | | |~| (%) | (# samples) |============================================~==============================================| 0 | SELECT STATEMENT | |~| 20.00 | Cpu (1) || 1 | TABLE ACCESS FULL | DELUDING_TAB2 |~| 80.00 | Cpu (1) || | | |~| | SQL*Net message to client (1) || | | |~| | SQL*Net more data to client (2) |============================================~==============================================
============================================~==============================| Id | Operation | Name |~| Activity | Activity Detail || | | |~| (%) | (# samples) |============================================~==============================| 0 | SELECT STATEMENT | |~| | || 1 | TABLE ACCESS FULL | DELUDING_TAB2 |~| 100.00 | Cpu (2) |============================================~==============================
58
FETCH #140651855557776:c=0,e=68,p=0,cr=2,cu=0,mis=0,r=15, ....WAIT #140651855557776: nam='SQL*Net message from client' ....WAIT #140651855557776: nam='SQL*Net message to client' ....FETCH #140651855557776:c=0,e=79,p=0,cr=2,cu=0,mis=0,r=15 ....WAIT #140651855557776: nam='SQL*Net message from client'....WAIT #140651855557776: nam='SQL*Net message to client'....FETCH #140651855557776:c=0,e=147,p=0,cr=9,cu=0,mis=0,r=15....WAIT #140651855557776: nam='SQL*Net message from client' ....WAIT #140651855557776: nam='SQL*Net message to client'....FETCH #140651855557776:c=0,e=101,p=0,cr=9,cu=0,mis=0,r=15,........以下略....
59
FETCH #140651855557776:c=2000,e=1695,p=64,cr=13,cu=0,mis=0,r=150,...WAIT #140651855557776: nam='SQL*Net message from client'.....WAIT #140651855557776: nam='SQL*Net message to client'.....FETCH #140651855557776:c=0,e=1093,p=0,cr=12,cu=0,mis=0,r=150,...WAIT #140651855557776: nam='SQL*Net message from client'.....WAIT #140651855557776: nam='SQL*Net message to client'.....FETCH #140651855557776:c=0,e=161,p=0,cr=12,cu=0,mis=0,r=150,....WAIT #140651855557776: nam='SQL*Net message from client'.....WAIT #140651855557776: nam='SQL*Net message to client'.....FETCH #140651855557776:c=18000,e=17507,p=0,cr=13,cu=0,mis=0,r=150,......以下略....
60
call count cpu elapsed disk query current rows------- ------ -------- ---------- ---------- ---------- ---------- ----------Parse 1 0.00 0.00 0 0 0 0Execute 1 0.00 0.00 0 0 0 0Fetch 6668 0.85 0.81 7742 13905 0 100000
Fetch 668 0.17 0.17 7742 8367 0 100000
Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to client 6668 0.00 0.14 direct path read 130 0.00 0.02 SQL*Net message from client 6668 0.01 8.17
SQL*Net message from client 668 0.03 3.83
61
62
63
🔺
64
65