使用expdp匯出時評估所需儲存容量大小

swq618發表於2017-02-28

我們在使用expdp進行資料匯出時,可以事先評估需要儲存大小容量(bytes),Oracle可以透過兩種方式進行容量估算:

[@more@]

1)、透過資料塊數量
2)、透過統計資訊中記錄的內容估算

具體是透過制定引數estimate_only和estimate來評估匯出的效能
引數estimate_only=y|n 指定是否僅作評估不會匯出資料
引數estimate=statistics|blocks引數來測試兩者的差異。
設定為estimate=bloks,Oracle會按照目標物件所佔用的資料塊個數乘以資料塊尺寸估算物件佔用的空間,
設定為estimate=statistics,Oracle根據最近統計值估算物件佔用空間
限制:當資料庫包含壓縮表時,estimate=blocks得出的結果會不準確,此時建議使用estimate=statistics

示例如下:
C:UsersAdministrator>expdp system/oracle schemas=scott estimate_only=y estimate=statistics

Export: Release 11.2.0.1.0 - Production on 星期三 11月 21 09:54:11 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

連線到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
啟動 "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** schemas=scott estimate_on
ly=y estimate=statistics
正在使用 STATISTICS 方法進行估計...
處理物件型別 SCHEMA_EXPORT/TABLE/TABLE_DATA
. 預計為 "SCOTT"."EMP" 7.683 KB
. 預計為 "SCOTT"."DEPT" 5.808 KB
. 預計為 "SCOTT"."SALGRADE" 5.808 KB
. 預計為 "SCOTT"."BONUS" 0 KB
使用 STATISTICS 方法的總估計: 19.30 KB
作業 "SYSTEM"."SYS_EXPORT_SCHEMA_01" 已於 09:54:36 成功完成

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29674916/viewspace-2134432/,如需轉載,請註明出處,否則將追究法律責任。

相關文章