惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Hacker News
The Hacker News
C
Cisco Blogs
Cyberwarzone
Cyberwarzone
N
News and Events Feed by Topic
AI
AI
P
Proofpoint News Feed
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
Webroot Blog
Webroot Blog
月光博客
月光博客
Simon Willison's Weblog
Simon Willison's Weblog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
C
CERT Recently Published Vulnerability Notes
www.infosecurity-magazine.com
www.infosecurity-magazine.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
D
DataBreaches.Net
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Heimdal Security Blog
S
Security @ Cisco Blogs
S
Securelist
M
MIT News - Artificial intelligence
Recorded Future
Recorded Future
Project Zero
Project Zero
K
Kaspersky official blog
Microsoft Security Blog
Microsoft Security Blog
T
Tenable Blog
Apple Machine Learning Research
Apple Machine Learning Research
P
Privacy International News Feed
小众软件
小众软件
T
Tor Project blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Full Disclosure
P
Palo Alto Networks Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 最新话题
V
Vulnerabilities – Threatpost
博客园 - Franky
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
T
Troy Hunt's Blog
V
Visual Studio Blog

博客园 - 疯子峰

oracle性能分析2 诡异的socket连接失败 ELK配置watcher 多进程 vs 多线程 关于时间 ELK日志平台 Java web项目 wordpress之客户端发布文章 神舟笔记本安装ubuntu 10.10 安装vs2010 AOP, Aspect-oriented programming 获取淘宝商品描述和价格 - 疯子峰 - 博客园 SPQuery查询语法简要说明(转) - 疯子峰 - 博客园 SPEmailEventReceiver 之导入附件EXCEL 为incoming mail绑定事件,SPEmailEventReceiver 安装Windows 2003更新后导致moss 无法访问 - 疯子峰 Ubuntu 的启动过程概览 linux 全局配置文件 vim 用户配置
oracle性能分析
疯子峰 · 2017-10-26 · via 博客园 - 疯子峰

Oracle性能分析

软件环境:Oracle 11g , 双机RAC.

问题:sql语句(单表单条件order_id查询)执行缓慢 >5s。

分析:

PL/SQL中执行F5,可以看到是全表扫描:TABLE ACCESS FULL.

查看表记录行数:10470628

解决:

创建索引后PL/SQL执行时间<0.2s

create index {IndexName} on {Tablename}( {Column} );

扩展:

查询系统中的大表

存储空间可以用如下语句查:
select df.tablespace_name "表空间名",
       totalspace "总空间M",
       freespace "剩余空间M",
       round((1 - freespace / totalspace) * 100, 2) "使用率%"
  from (select tablespace_name, round(sum(bytes) / 1024 / 1024) totalspace
          from dba_data_files
         group by tablespace_name) df,
       (select tablespace_name, round(sum(bytes) / 1024 / 1024) freespace
          from dba_free_space
         group by tablespace_name) fs
 where df.tablespace_name = fs.tablespace_name;

查记录条数可以用如下语句:
select table_name,num_rows,t.owner from dba_tables t where num_rows > 0 and t.owner <> 'SYS'   order by num_rows desc;