首页 > 数据库技术 > 详细

There will be decreasing performance of oracle by delete whole table and then insert ...

时间:2014-04-03 04:58:04      阅读:580      评论:0      收藏:0      [点我收藏+]

There is a project that need collecting periodically  (2 months) data into one table and then exporting it  as excel file. The table is a temporary table, the app do that 

delete from tb_name;

insert into tb_name values.....
...
insert into tb_name values.....

With that method, it would be causing more and more tablespace fragments, and make the performance decresing.

In other to avoid this disadvantage influences, I suggest programer modify the app as 


truncate table tb_name drop storage;

insert into tb_name select * from ...


The delete operation will be causing tablespace fragments.

There will be decreasing performance of oracle by delete whole table and then insert ...,布布扣,bubuko.com

There will be decreasing performance of oracle by delete whole table and then insert ...

原文:http://blog.csdn.net/ora_raymond/article/details/22822657

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!