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

推荐订阅源

N
News | PayPal Newsroom
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
H
Hacker News: Front Page
Apple Machine Learning Research
Apple Machine Learning Research
TaoSecurity Blog
TaoSecurity Blog
Help Net Security
Help Net Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
Security Latest
Security Latest
Cloudbric
Cloudbric
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
L
LangChain Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
W
WeLiveSecurity
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
小众软件
小众软件
NISL@THU
NISL@THU
云风的 BLOG
云风的 BLOG
P
Privacy & Cybersecurity Law Blog
S
Security @ Cisco Blogs
博客园 - 【当耐特】
I
InfoQ
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Proofpoint News Feed
O
OpenAI News
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
量子位
宝玉的分享
宝玉的分享

博客园 - 知道得越多知道的越少

window10上登录Oracle时提示ORA-12546:Permission denied 大表的主键创建优化技术(转一篇有深度的文章) Oracle并行执行特性应用初探 解决Rhel5上安装VMWare tools的问题 Oracle 性能诊断艺术 第四章 笔记 Oracle国外站点汇集 在客户端通过外部表访问Trace文件的内容 SQL条件的顺序对性能的影响 用SQL语句求排除断号的号码串 易用性规范 64位Oracle数据库环境下安装使用32位的PLSQL-Developer 使用Pivot进行行列转换不能合并为一行的问题 删除Oracle程序,重装后遇到的两个小问题 闪回查询,9i,10G到11G的不断增强 归档日志充满的问题解决 ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务 问题解决 生成SQL记录集的一些数据 导入的数据,删除约束后没有自动删除对应索引,重建约束出错 如何取出某一用户的密码,再原封不动的改回去?
查出全表扫描的相关SQL语句
知道得越多知道的越少 · 2009-10-29 · via 博客园 - 知道得越多知道的越少

1.按指定的应用程序查

Select T.Sql_Text, T.Disk_Reads, T.First_Load_Time, T.Module, U.Username, T.Hash_Value
From V$sqlarea T, V$sql_Plan P, All_Users U
Where T.Hash_Value = P.Hash_Value And P.Operation = 'TABLE ACCESS' And U.User_Id = T.Parsing_User_Id And
      P.Options = 'FULL' And T.Module = 'xxx.exe' And Disk_Reads <> 0
Order By Disk_Reads Desc, Sql_Text

Select Sql_Text From V$sqltext Where Hash_Value = 190441126 Order By Piece

2.显示读取的数据量(行和块数)
Select Sp.Object_Owner, Sp.Object_Name,
       (Select Sql_Text From V$sqlarea Sa Where Sa.Address = Sp.Address And Sa.Hash_Value = Sp.Hash_Value) Sqltext,
       (Select Executions From V$sqlarea Sa Where Sa.Address = Sp.Address And Sa.Hash_Value = Sp.Hash_Value) No_Of_Full_Scans,
       (Select LPad(Nvl(Trim(To_Char(Num_Rows)), ' '), 15, ' ') || ' | ' ||
                 LPad(Nvl(Trim(To_Char(Blocks)), ' '), 15, ' ') || ' | ' || Buffer_Pool
         From Dba_Tables
         Where Table_Name = Sp.Object_Name And Owner = Sp.Object_Owner) "rows|blocks|pool"
From V$sql_Plan Sp
Where Operation = 'TABLE ACCESS' And Options = 'FULL' And Object_Owner In ('ZLHIS')
Order By 1, 2;

3.显示读取的数据量(字节数)
select to_char(sysdate,'yyyymm') as tjyf,a.object_owner, a.object_name,c.BYTES/1024/1024,sum(b.EXECUTIONS)  
from  
     (select object_owner,object_name,HASH_VALUE  
 from v$sql_plan  
  where object_owner not in ('SYS', 'SYSTEM','DBSNMP','OUTLN','PERFSTAT','PUBLIC','SQLAB','WMSYS') and OPTIONS = 'FULL' 
  group by object_owner,object_name,HASH_VALUE) a,  
     v$sqlarea b, dba_segments c  
  where a.HASH_VALUE = b.HASH_VALUE  
        and a.OBJECT_OWNER=c.owner  
        and a.object_name=c.segment_name  
       and c.segment_type='TABLE' 
 group by to_char(sysdate,'yyyymm'),a.object_owner, a.object_name,c.BYTES/1024/1024 
   order by sum(b.EXECUTIONS);