首页  >  文章  >  数据库  >  Therewillbedecreasingperformanceoforaclebydeletewholetablean

Therewillbedecreasingperformanceoforaclebydeletewholetablean

WBOY
WBOY原创
2016-06-07 15:54:421173浏览

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_n

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.

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn