我正在尝试通过copy命令将oracle表导出到本地postgresql转储中:
\copy (select * from remote_oracle_table) to /postgresql/table.dump with binary;
oracle表的大小是25G。然而,copy命令创建了一个50G的文件。这怎么可能呢?
我能够从远程oracle表中进行选择,因为我有oracle_fdw扩展。
我创建一个表并用数据填充它:
create table tab
as
select 'value' || level val
from dual
connect by level <= 10000;
如果然后删除所有行并插入相同的数据:
delete from tab;
insert into tab
select 'value' || level val
from dual
connect by level <= 10000;
commit;
每次执行delete-然后-insert时,表大小都会增加。多次执行这些操作会使表增长到原来大小的许多
我们在两个不同的服务器上有Oracle11gR1 RAC两个实例,新的撤销表空间UNDOTBS20140508创建了30G,我想删除旧的UNDOTBSX02,我做了以下工作:
CREATE UNDO TABLESPACE UNDOTBS20140508 DATAFILE '+DATA/....../UNDOTBS20140508' SIZE 20G;
ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS20140508;
DROP TABLESPACE UNDOTBSX02 INCLUDING CONTENTS AND DATAFILES;
当