ホームページ  >  記事  >  データベース  >  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 までご連絡ください。
前の記事:C#VS2010连接数据库大全次の記事:MyBatis简介