oracle並行原理詳解(下)

來源:互聯網
上載者:User

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)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.