1. Как видно из примера экспорт datapump выдает завышенную в несколько раз оценку:
$ expdp SYSTEM ESTIMATE_ONLY=YES NOLOGFILE=YES SCHEMAS=HR
Export: Release 19.0.0.0.0 - Production on Sat Nov 5 03:42:34 2022
Version 19.9.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Password:
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": SYSTEM/******** ESTIMATE_ONLY=YES NOLOGFILE=YES SCHEMAS=HR
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. estimated "HR"."COUNTRIES" 1024 KB
. estimated "HR"."DEPARTMENTS" 1024 KB
. estimated "HR"."EMPLOYEES" 1024 KB
. estimated "HR"."JOBS" 1024 KB
. estimated "HR"."JOB_HISTORY" 1024 KB
. estimated "HR"."LOCATIONS" 1024 KB
. estimated "HR"."REGIONS" 1024 KB
Total estimation using BLOCKS method: 7 MB
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Sat Nov 5 03:42:42 2022 elapsed 0 00:00:03
$ expdp SYSTEM SCHEMAS=HR DUMPFILE=hrdata.dmp DIRECTORY=DATA_PUMP_DIR LOGFILE=hr20221105.log PARALLEL=1 COMPRESSION=NONE
Export: Release 19.0.0.0.0 - Production on Sat Nov 5 03:43:51 2022
Version 19.9.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Password:
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": SYSTEM/******** SCHEMAS=HR DUMPFILE=hrdata.dmp DIRECTORY=DATA_PUMP_DIR LOGFILE=hr20221105.log PARALLEL=1 COMPRESSION=NONE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
. . exported "HR"."EMPLOYEES" 17.10 KB 107 rows
. . exported "HR"."LOCATIONS" 8.437 KB 23 rows
. . exported "HR"."JOB_HISTORY" 7.195 KB 10 rows
. . exported "HR"."JOBS" 7.109 KB 19 rows
. . exported "HR"."DEPARTMENTS" 7.125 KB 27 rows
. . exported "HR"."COUNTRIES" 6.367 KB 25 rows
. . exported "HR"."REGIONS" 5.546 KB 4 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
/home/oracle/hrdata.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Sat Nov 5 03:44:47 2022 elapsed 0 00:00:52
$ ls -la
total 924
drwxr-x---. 2 oracle oinstall 4096 Nov 5 03:48 .
drwxr-x---. 6 oracle oinstall 4096 Jul 17 2019 ..
-rw-r--r--. 1 oracle oinstall 2534 Nov 5 03:44 hr20221105.log
-rw-r-----. 1 oracle oinstall 933888 Nov 5 03:44 hrdata.dmp
2. В ноте Understanding the ESTIMATE and ESTIMATE_ONLY Parameters in Export DataPump (Doc ID 786165.1) приведен пример оценки фрагментации LOB-сегментов, но мой пример без LOB-сегментов:
Код: Выделить всё
SQL> SELECT segment_type, sum(bytes) FROM dba_segments WHERE owner IN ('HR') GROUP BY segment_type;
SEGMENT_TYPE SUM(BYTES)
------------------ ----------
INDEX 20971520
TABLE 6291456