Blogger Information
Blog 75
fans 0
comment 0
visits 54651
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
小猿圈数据库之Oracle数据库性能优化
聆听的博客
Original
619 people have browsed it

数据库有好多种,分为关系型数据库和非关系型数据库,小猿圈加加这篇文章对oracle数据库性能优化有个小技巧分享给大家,看到这篇文章的朋友们一定要好***看了,对你有帮助,以后会变为金子的!!!

--在Oacle数据库涉及到全表扫描的SQL查询(top,count)中,
--现场用户删除表中大部分数据,只保留1W条数据,但是查询仍然很慢,检查磁盘IO,发现磁盘IO不是很高
--经过分析Oacle数据库的表被撑大后,虽然删除了数据,但是数据块仍然被该表占用,全表扫描时,
--这些数据块都会被遍历,导致查询性能很慢。

--查询数据块SQL语句如下

实例

select * from dba_segments where segment_name in ('table_name_1');

运行实例 »

--解决方案
--对Oacle数据库表进行收缩操作
--SQL语句如下

实例

alter table table_name_1 enable row movement ;
alter table table_name_1 enable shrink space ;

运行实例 »

这个小技巧大家都get到了吗,有时候数据库的表被撑大后,删了很多数据还是老样子,查询很慢,这种情况可以用一下这个小技巧,对数据库进行优化,感觉不错的,可以看看小猿圈其他技巧,收获多多。

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!