Showing posts with label compression. Show all posts
Showing posts with label compression. Show all posts

Friday, March 1, 2013

expdp estimate_only with & Without compression

Application team wants us to refresh a table which has LOB data's. So we wanna check the size of the export dump file before running it to allocate storage.

Using Datapump its a very easy task but want to check whether we can estimate the size of the Compressed Export Dump file. 

From 11g onwards, advanced compresssion was introduced which will compress DATA's also when compared to the option of compressing only METADATA which was available in 10g.

##########################
#   Task 
##########################

Compare the Datapump Export Dumpfile size using Compressed and Normal one.

Lets see the Difference between using Normal & Compressed

##########################
#   Normal Export Estimation  
##########################

Command to Estimate export dumpfile.


expdp / tables=u1.T1393 estimate_only=y

mydb_2 @ myserver:/dcunix
> expdp \'/ as sysdba\' tables=u1.T1393 estimate_only=y

Export: Release 11.2.0.3.0 - Production on Fri Mar 1 02:32:30 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TABLE_01":  "/******** AS SYSDBA" tables=u1.T1393 estimate_only=y
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
.  estimated "u1"."T1393"                           190.4 GB
Total estimation using BLOCKS method: 190.4 GB
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at 02:33:06

So Estimated Size using Normal One is 190.4 GB. 



##########################
#   Compressed Export Estimation  
##########################

Command to Estimate Compressed export dumpfile.


expdp / tables=u1.T1393  tables=u1.T1393 compression=all estimate_only=y


mydb_2 @ myserver:/dcunix
> expdp \'/ as sysdba\' tables=u1.T1393 compression=all estimate_only=y

Export: Release 11.2.0.3.0 - Production on Fri Mar 1 02:34:29 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TABLE_01":  "/******** AS SYSDBA" tables=u1.T1393 compression=all estimate_only=y
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
.  estimated "u1"."T1393"                           190.4 GB
Total estimation using BLOCKS method: 190.4 GB
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at 02:34:40


So Estimated Size using Compressed One is also 190.4 GB. 


##########################
 End of Story 
##########################

 We cant estimate the Size of the compressed Export Dump File. Hope Oracle May introduce this in Upcoming Versions. 


In 10g, we can compress only METADATA's but from 11g onwards we can compress DATA's also.  
 Available Options in 11g, Compression Parameters are,
NONE
METADATA_ONLY
DATA_ONLY
ALL
This Advanced Compression in 11g requires license so make sure before using it.