exporting consumes lot, even after removing lots of tables [message #529167] |
Sat, 29 October 2011 02:37 |
hudo
Messages: 165 Registered: May 2004
|
Senior Member |
|
|
Exporting the schema consumes e.g 22 MB. Before some major changes on the tables, the tables have been doubled, the export consumes about 46 MB. After the changes, the doubled tables have been removed, even from the recycle bin. But the export still consumes around 40 MB.
Why ?
|
|
|
|
Re: exporting consumes lot, even after removing lots of tables [message #529171 is a reply to message #529169] |
Sat, 29 October 2011 04:34 |
hudo
Messages: 165 Registered: May 2004
|
Senior Member |
|
|
Think of scott.emp and scott.dept having lots more rows. Exporting this schema with
#!/bin/bash
ZEIT=`date +%Y%m%d_%H%M%S`
echo $ZEIT
DATEI="scott_$ZEIT.dmp"
echo $DATEI
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export PATH=$PATH:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
export ORACLE_SID=XE
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/expdp scott/tiger DIRECTORY=DUMPDIR DUMPFILE=$DATEI
results in a file of size 20 MB.
Now I duplicate the tables
CREATE emp_2 AS SELECT * FROM EMP;
CREATE dept_2 AS SELECT * FROM DEPT;
The new export results in a ca. 40 MB file.
Then dropping the duplicates
DROP TABLE emp_2;
DROP TABLE dept_2;
and purging the recylce bin (using the graphical interface: Home>Utilities>Recycle Bin>Purge Recycle Bin)
A new export still results in a 40 MB file.
Why ?
|
|
|
|