Statistics 统计信息
----------------------------------------------------------
197 recursive calls
185 db block gets
92 consistent gets
60 physical reads
37128 redo size 37128 redo量
664 bytes sent via SQL*Net to client
571 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
3 sorts (memory)
0 sorts (disk)
10340 rows processed
LS@LEO> rollback; 回滚
Rollback complete.
LS@LEO> insert /*+ append */ into leo_t5 select * from leo_t6; 直接加载
10340 rows created.
Statistics
----------------------------------------------------------
111 recursive calls
180 db block gets
79 consistent gets
21 physical reads
36640 redo size 36640 redo量
664 bytes sent via SQL*Net to client
585 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
10340 rows processed
小结:我们看到传统加载和直接加载产生的redo量并没有太大的差异,因为只要底层数据块发生变化,就会生成redo信息,
不管传统和直接都会修改数据块,用来恢复依据,所以并没有太大的差异。
(10)直接加载和索引
LS@LEO> set autotrace trace stat;
LS@LEO> insert /*+ append */ into leo_t5 select * from leo_t6; 直接加载,但表上没有索引
10340 rows created.
Statistics 统计信息
----------------------------------------------------------
111 recursive calls
175 db block gets
81 consistent gets
15 physical reads
36816 redo size 36816 redo量
664 bytes sent via SQL*Net to client
585 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
10340 rows processed
LS@LEO> create index leo_t5_index on leo_t5(object_id); 给表创建索引
Index created.
LS@LEO> rollback; 回滚
Rollback complete.
LS@LEO> insert /*+ append */ into leo_t5 select * from leo_t6; 直接加载,但表上有索引
10340 rows created.
Statistics 统计信息
----------------------------------------------------------
120 recursive calls
193 db block gets
85 consistent gets
22 physical reads
37344 redo size 37344 redo量
664 bytes sent via SQL*Net to client
585 bytes received via SQL*Net from client
4 SQL*Net roundtrips to/from client
3 sorts (memory)