定位高消耗资源的sql语句
来源:互联网 发布:济南大数据产业基地 编辑:程序博客网 时间:2024/04/28 03:51
第一天写博客,就从一条sql语句开始吧!
用到的sql视图有v$sqlstats、v$sqltext
下面对v$sqlstats的官方解释:
V$SQLSTATS returns basic performance statistics for SQL cursors, with each row representing the data fora unique combination of SQL text and optimizer plan (that is, unique combination of SQL_ID, and PLAN_HASH_VALUE). The column definitions for columns in V$SQLSTATS are identical to those in the V$SQL and V$SQLAREA views. However, the V$SQLSTATS view differs from V$SQL and V$SQLAREA in that itis faster, more scalable, and has a greater data retention (the statistics may still appear in this view, even after the cursor has been aged out of the shared pool). Note that V$SQLSTATS contains a subset of columns that appear in V$SQL and V$SQLAREA
select max(disk_reads),max(executions),max(buffer_gets),max(sorts) from v$sqlstats;
列的意思:
disk_reads:Number of disk reads for all cursors with this SQL text and plan
executions:Number of executions that took place on this object since it was brought into the library cache
buffer_gets:Number of buffer gets for all cursors with this SQL text and plan
sorts:Number of sorts that were done for the child cursor
找到buffer_gets过大的sql
select sql_text from v$sqlstats where buffer_gets > ????;
要想看全的sql信息,查询v$sqltext视图。
- 定位高消耗资源的sql语句
- Oracle高资源消耗SQL语句定位
- Oracle高资源消耗SQL语句定位
- sqlserver定位消耗资源比较高的sql
- postgresql定位分析消耗CPU高的SQL语句
- 如何定位资源消耗多的SQL
- 如何定位消耗多的sql语句
- 如何定位重要(消耗资源多)的SQL
- 定位消耗资源较大和性能低效的sql
- oracle 中如何定位重要(消耗资源多)的SQL
- 定位重要(消耗资源多)的SQL
- oracle 中如何定位重要(消耗资源多)的SQL
- Oracle 中定位重要(消耗资源多)的SQL
- oracle 中如何定位重要(消耗资源多)的SQL
- col 命令+查询最消耗cpu资源的SQL语句
- ORALE实时查询最消耗CPU资源的SQL语句
- Oracle查询当前高CPU消耗的SQL语句
- 定位CPU高消耗的问题
- KBE里面的内联
- 温习一下数据结构
- 学会Android开发四大组件
- 6月14日
- 找回我自己
- 定位高消耗资源的sql语句
- [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s
- iOS开发——keychain的使用
- 10步成为专业iOS开发者——从零起步
- GIT的使用
- sublime text3常用插件
- 马云:机器人会成为家庭一员
- cocos code ide为ide测试cocos2dx lua-binding
- 慢查询优化