I guess what happen in your database is
once you saved quite a lot of data in the tables and the big extends added which occupied some spaces in tablespace.
while you delete some table , but the space is still occurpied as you didn't truncate the table ( the HWM is still at the high position)but when you do export , you choose compress mode, which compress the data to the actual size . so it look small .Am I right ?
光说不练之龙飞虎
once you saved quite a lot of data in the tables and the big extends added which occupied some spaces in tablespace.
while you delete some table , but the space is still occurpied as you didn't truncate the table ( the HWM is still at the high position)but when you do export , you choose compress mode, which compress the data to the actual size . so it look small .Am I right ?
光说不练之龙飞虎
这是因为这些表虽然没有这么多记录,但ORACLE数据表的空间不是因为你
删除记录就会回收的。
CREATE TABLE "OA_PVT04" ("BBH" NUMBER(*,0) NOT NULL, "HXH" NUMBER(*,0) NOT NULL, "LXH" NUMBER(*,0) NOT NULL, "HJSCX" NUMBER(*,0) DEFAULT 0 NOT NULL, "LJSCX" NUMBER(*,0) DEFAULT 0 NOT NULL, "QXGGBZ" NUMBER(1, 0) DEFAULT 0 NOT NULL, "HZBZ" NUMBER(*,0), "GS" VARCHAR2(1024)) PCTFREE 30 PCTUSED 70 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 983040 NEXT 61440 MINEXTENTS 1 MAXEXTENTS 121 PCTINCREASE 2 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "SI"
这时我从EXP的文件里截出来的,表里也是没有记录
看看INITIAL 983040 NEXT 61440 你就知道了,用这条SQL建立表也会占数据文件的空间。
我说的是这个意思,我在存入几百兆的数据后全删除,然后再存入(折腾了点),数据据库的文件在原来的基础上继续增大,为什么?如何解决?(我以用户级导出时是进行了压缩)
sql>alter database datafile 'full_path_datafilename' autoextend off;
在insert时可以指定用direct方式,使用imp和sqlldr时都可以用direct方式。
你是怎么向表里加入数据的呢
----------Oracle初学者。