----------
3
1
2
3
4
5
6
7
8
9
19
10
1
11
12
13
14
15
16
17
18
21 rows selected.
SYS@ORCL>alter system flush buffer_cache;
System altered.
SYS@ORCL>update test_db1 set x=21 where x=18;
1 row updated.
Execution Plan
----------------------------------------------------------
Plan hash value: 2185639234
-------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT | | 1 | 13 | 2 (0)| 00:00:01 |
| 1 | UPDATE | TEST_DB1 | | | | |
|* 2 | TABLE ACCESS FULL| TEST_DB1 | 1 | 13 | 2 (0)| 00:00:01 |
-------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter("X"=18)
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
5 recursive calls
1 db block gets
9 consistent gets
0 physical reads
412 redo size
678 bytes sent via SQL*Net to client
567 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
二、对于比较大的表来说
SYS@ORCL>create table test_db1 as select * from dba_objects;Table created.
SYS@ORCL>insert into test_db1 values('tyger','tyger','tyger',22,23,'tyger','04-SEP-14','04-SEP-14','tyger','t','t','t','t');
1 row created.
Execution Plan
----------------------------------------------------------
-------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------
| 0 | INSERT STATEMENT | | 1 | 100 | 1 (0)| 00:00:01 |
-------------------------------------------------------------------------
Statistics
----------------------------------------------------------
1 recursive calls
15 db block gets
1 consistent gets
5 physical reads
1144 redo size
677 bytes sent via SQL*Net to client
646 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
1 rows processed
SYS@ORCL>alter system flush buffer_cache;
System altered.
SYS@ORCL>update test_db1 set OBJECT_NAME='tom' where owner='tyger';
3 rows updated.
Execution Plan
----------------------------------------------------------
Plan hash value: 2185639234
-------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT | | 8 | 664 | 154 (2)| 00:00:02 |
| 1 | UPDATE | TEST_DB1 | | | | |
|* 2 | TABLE ACCESS FULL| TEST_DB1 | 8 | 664 | 154 (2)| 00:00:02 |
-------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter("OWNER"='tyger')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
5 recursive calls
3 db block gets
769 consistent gets
687 physical reads
824 redo siz