EXP 时候 compress 实验 2:
新建表test
SQL> create table test as select * from dba_objects;
Table created
查看当前test的记录数和大小
SQL> select count(*) from test;
COUNT(*)
----------
52969
SQL> select bytes/1024/1024 as M from user_segments a where a.segment_name='TEST';
M
----------
6
从test 中delete数据 不会降低高水位
SQL> delete from test;
52969 rows deleted
SQL> commit;
Commit complete
SQL> select count(*) from test;
COUNT(*)
----------
0
当前test的定义
create table TEST
(
OWNER VARCHAR2(30),
OBJECT_NAME VARCHAR2(128),
SUBOBJECT_NAME VARCHAR2(30),
OBJECT_ID NUMBER,
DATA_OBJECT_ID NUMBER,
OBJECT_TYPE VARCHAR2(19),
CREATED DATE,
LAST_DDL_TIME DATE,
TIMESTAMP VARCHAR2(19),
STATUS VARCHAR2(7),
TEMPORARY VARCHAR2(1),
GENERATED VARCHAR2(1),
SECONDARY VARCHAR2(1)
)
tablespace DANG_DATA
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K --注意这块
minextents 1
maxextents unlimited
);
导出 test,分别是 compress=n 和 compress=y
C:\Users\Administrator>exp yafeishi/dang file=c:\test_n.dmp tables=test compress
=n
Export: Release 10.2.0.3.0 - Production on 星期三 4月 18 13:13:09 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径...
. . 正在导出表 TEST导出了 0 行
成功终止导出, 没有出现警告。
C:\Users\Administrator>exp yafeishi/dang file=c:\test_y.dmp tables=test
Export: Release 10.2.0.3.0 - Production on 星期三 4月 18 13:13:25 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径...
. . 正在导出表 TEST导出了 0 行
成功终止导出, 没有出现警告。
删除test
SQL> drop table test;
Table dropped
导入 compress=y 的文件
C:\Users\Administrator>imp yafeishi/dang file=c:\test_y.dmp fromuser=yafeishi to
user=yafeishi
Import: Release 10.2.0.3.0 - Production on 星期三 4月 18 13:15:14 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
经由常规路径由 EXPORT:V10.02.01 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 YAFEISHI 的对象导入到 YAFEISHI
. . 正在导入表 "TEST"导入了 0 行
成功终止导入, 没有出现警告。
SQL> select bytes/1024/1024 as M from user_segments a where a.segment_name='TEST';
M
----------
6
-- Create table
create table TEST
(
OWNER VARCHAR2(30),
OBJECT_NAME VARCHAR2(128),
SUBOBJECT_NAME VARCHAR2(30),
OBJECT_ID NUMBER,
DATA_OBJECT_ID NUMBER,
OBJECT_TYPE VARCHAR2(19),
CREATED DATE,
LAST_DDL_TIME DATE,
TIMESTAMP VARCHAR2(19),
STATUS VARCHAR2(7),
TEMPORARY VARCHAR2(1),
GENERATED VARCHAR2(1),
SECONDARY VARCHAR2(1)
)
tablespace DANG_DATA
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 6M --注意这块
minextents 1
maxextents unlimited
);
删除test
SQL> drop table test;
Table dropped
导入 compress=n 的文件
C:\Users\Administrator>imp yafeishi/dang file=c:\test_n.dmp fromuser=yafeishi to
user=yafeishi
Import: Release 10.2.0.3.0 - Production on 星期三 4月 18 13:18:00 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
经由常规路径由 EXPORT:V10.02.01 创建的导出文件
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 YAFEISHI 的对象导入到 YAFEISHI
. . 正在导入表 "TEST"导入了 0 行
成功终止导入, 没有出现警告。
SQL> select bytes/1024/1024 as M from user_segments a where a.segment_name='TEST';
M
----------
0.0625
-- Create table
create table TEST
(
OWNER VARCHAR2(30),
OBJECT_NAME VARCHAR2(128),
SUBOBJECT_NAME VARCHAR2(30),
OBJECT_ID NUMBER,
DATA_OBJECT_ID NUMBER,
OBJECT_TYPE VARCHAR2(19),
CREATED DATE,
LAST_DDL_TIME DATE,
TIMESTAMP VARCHAR2(19),
STATUS VARCHAR2(7),
TEMPORARY VARCHAR2(1),
GENERATED VARCHAR2(1),
SECONDARY VARCHAR2(1)
)
tablespace DANG_DATA
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K --注意这块
minextents 1
maxextents unlimited
);
--EOF