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)