How to reduce the table size for any table while using truncate or delete statements. In oracle 8i it was truncating the storage space but in 10g it is not ....
I have given truncate statement in a procedure to drop the storage of a table used... when its record count exceeds 500.
[code=oracle]
BEGIN
i:= 0;
FOR CC IN NLD LOOP
DELETE FROM CHN_BED5A_T4_FX ;
COMMIT;
DELETE FROM CHN_BED5B_T4_FX ;
COMMIT;
if i=500
then
EXECUTE IMMEDIATE('TRUN CATE table CHN_BED5A_T4_FX ');
EXECUTE IMMEDIATE('TRUN CATE table CHN_BED5B_T4_FX ');
i:= 0;
end if;
commit;
[/code]
This is the part where i truncate..
Can anyone help me with truncating the storage space as well since i am not able to run my reports with this increasing table size.....
I have given truncate statement in a procedure to drop the storage of a table used... when its record count exceeds 500.
[code=oracle]
BEGIN
i:= 0;
FOR CC IN NLD LOOP
DELETE FROM CHN_BED5A_T4_FX ;
COMMIT;
DELETE FROM CHN_BED5B_T4_FX ;
COMMIT;
if i=500
then
EXECUTE IMMEDIATE('TRUN CATE table CHN_BED5A_T4_FX ');
EXECUTE IMMEDIATE('TRUN CATE table CHN_BED5B_T4_FX ');
i:= 0;
end if;
commit;
[/code]
This is the part where i truncate..
Can anyone help me with truncating the storage space as well since i am not able to run my reports with this increasing table size.....
Comment