公告

博客统计信息

用户名:jiwang1980
文章数:166
评论数:11
访问量:33803
无忧币:5884
博客积分:822
博客等级:4
注册日期:2009-03-22

我最近发表的评论

学习v$librarycache 回复
The GETS column indicates the num..
Hadoop原理 回复
http://www.itpub.net/thread-18889..
mysql的grant权限 回复
MySQL权限的架构体系 http://www...
xtrabackup备份 回复
MySQL的热备份开源工具XtraBackup|@..
PLEAC-Perl 教程.. 回复
    11/Oct/2011:11:44..
2012-03-17 14:08:10
http://space.itpub.net/?uid-26194866-action-viewspace-itemid-718352
 
首先要说的是,不同版本数据库提供的系统表会有不同,你可以根据数据字典查看该版本数据库所提供的表 
like   t..
http://space.itpub.net/12361284/viewspace-154924
 
 
在系统运行过程中,如果我们发现Cache hit rate过小,或者我们通过观察statspack中的Instance Efficiency Percentages这部分呢,我们会发现Buf..
http://blog.csdn.net/wh62592855/article/details/4873859
 
 

先来看一个“看起来”比较奇怪的现象
SQL> col name for a40

SQL> col value for a30

SQL> select name,v..
http://blog.sina.com.cn/s/blog_6ceed3280100x0q5.html
 

通过v$sqlarea,v$sql查询最占用资源的查询













(2011-09-01 22:22:09)
转载▼





标签:
杂谈

 






-----------------------

v$sqlarea,v$sql

-----------------------
从V$SQLAREA中查询最占用资源的查询
select b.username username,a.disk_reads reads,

    a.executions exec,a.disk_reads/decode(a.executions,0,1,a.executions) rds_exec_ratio,

    a.sql_text Statement

from  v$sqlarea a,dba_users b

where a.parsing_user_id=b.user_id

 and a.disk_reads > 100000

order by a.disk_reads desc;
用buffer_gets列来替换disk_reads列可以得到占用最多内存的sql语句的相关信息。
 
V$SQL是内存共享SQL区域中已经解析的SQL语句。


列出使用频率最高的5个查询:
select sql_text,executions

from (select sql_text,executions,

   rank() over

    (order by executions desc) exec_rank

   from v$sql)

where exec_rank <=5;
消耗磁盘读取最多的sql top5:

select disk_reads,sql_text

from (select sql_text,disk_reads,

   dense_rank() over

     (order by disk_reads desc) disk_reads_rank

   from v$sql)

where disk_reads_rank <=5;


找出需要大量缓冲读取(逻辑读)操作的查询:
select buffer_gets,sql_text

from (select sql_text,buffer_gets,

   dense_rank() over

     (order by buffer_gets desc) buffer_gets_rank

   from v$sql)

where buffer_gets_rank<=5;
 
 


V$SQLAREA

本视图持续跟踪所有shared pool中的共享cursor,在shared pool中的每一条SQL语句都对应一列。本视图在分析SQL语句资源使用方面非常重要。



V$SQLAREA中的信息列



HASH_VALUE:SQL语句的Hash值。

ADDRESS:SQL语句在SGA中的地址。

这两列被用于鉴别SQL语句,有时,两条不同的语句可能hash值相同。这时候,必须连同ADDRESS一同使用来确认SQL语句。

PARSING_USER_ID:为语句解析第一条CURSOR的用户

VERSION_COUNT:语句cursor的数量

KEPT_VERSIONS:

SHARABLE_MEMORY:cursor使用的共享内存总数

PERSISTENT_MEMORY:cursor使用的常驻内存总数

RUNTIME_MEMORY:cursor使用的运行时内存总数。

SQL_TEXT:SQL语句的文本(最大只能保存该语句的前1000个字符)。

MODULE,ACTION:使用了DBMS_APPLICATION_INFO时session解析第一条cursor时的信息



V$SQLAREA中的其它常用列



SORTS: 语句的排序数

CPU_TIME: 语句被解析和执行的CPU时间

ELAPSED_TIME: 语句被解析和执行的共用时间

PARSE_CALLS: 语句的解析调用(软、硬)次数

EXECUTIONS: 语句的执行次数

INVALIDATIONS: 语句的cursor失效次数

LOADS: 语句载入(载出)数量

ROWS_PROCESSED: 语句返回的列总数



V$SQLAREA中的连接列Column View Joined Column(s)

HASH_VALUE, ADDRESS V$SESSION SQL_HASH_VALUE, SQL_ADDRESS

HASH_VALUE, ADDRESS V$SQLTEXT, V$SQL, V$OPEN_CURSOR HASH_VALUE, ADDRESS

SQL_TEXT V$DB_OBJECT_CACHE NAME



示例:

1.查看消耗资源最多的SQL:



Sql代码 复制代码 
2012-03-13 09:37:32
http://www.blogjava.net/gdufo/archive/2010/01/01/307966.html
学习v$librarycache
转自:http://blog.chinaunix.net/u2/66903/showart_2004210.html



通过查看v$librarycache视图,可以监控library cach..
http://bbs.ywlm.net/thread-857-1-1.html
 


Keepalived安装错误一例(make错误)


在make的时候出现了下面错误:

===============================================================

/usr/includ..
2012-02-02 16:30:41
ERROR at line 1:

ORA-13504: No SYSAUX datafile clause specified
 
 
原因 11g需要先创建 sysaux file
加上
SYSAUX DATAFILE '/u01/oradata/ywang/sysaux01.dbf'  size 100M
 
&..
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
 
http://www.cnblogs.com/dba001/archive/2011/10/22/2221267.html
前一段时间修改了主机的hostname,重启oracle是提示错误ORA-..
2011-12-29 17:36:20
http://www.programmer.com.cn/4199/
 
视觉中国的NoSQL之路:从MySQL到MongoDB
http://nightsailer.com/2011/04/10/853.html
MongoDB应用实践完整版
以备不时之需
 
http://hi.baidu.com/%C3%CE%C0%EF%CF%E3%B0%CD%C0%AD/blog/item/dd69d4ed2d4cb04678f055a0.html
 

如果目前只有一个ibd的文件,那么我们该怎么恢复整个数据库?原文的作者给出了..
类别:MySQL|阅读(30)|回复(0)|(0)阅读全文>>
2011-12-14 11:45:46
遇到些问题
1.安装的时候路径设置
2.perl模块在安装目录里,cpan上没有
3.需要更改my.cnf配置文件,添加相关参数
 
安装
http://hi.baidu.com/jgs2009/blog/item/25374adf77451a4495ee3727.html
&nbs..
2011-12-09 15:55:29
http://lihuipeng.blog.51cto.com/3064864/689064
 
标签:mysql 读写分离 mysql-mmm 故障自动切换
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律..
2011-12-05 09:53:54
UPDATE tc_xxx SET type='A_PAY' WHERE type='APAY';
type为enum类型。sql有warning
所有type值为空了。因为enum列找不到对应的值
需要先将新类型添加,然后update
类别:MySQL|阅读(20)|回复(1)|(0)阅读全文>>
2011-11-30 18:07:52
 watch -n 2 'mysql -uroot -p2012_360hqb -e "show engine innodb status\G" >> www.log';
 
http://g.51cto.com/mike/67136
启动innodb_monitor的方法
 
在使用Innodb做为..
2011-11-30 11:51:05
mysql
perl
--------------
java
oracle
hadoop(hive,hbase)
postgreSQL
nosql(mongo,etc)
--------------
BI,ETL
2011-11-28 18:05:42
http://www.mysqlops.com/2011/08/10/mysql-query-cache.html
MySQL加速查询速度的独门武器:查询缓存

八月 10, 2011 by Eugene · 4 Comments 

【导读】
    与朋友或同事谈..
2011-11-22 16:00:27
 
www.markleith.co.uk/?p=377
 
Internally MySQL uses various methods to manage (or, block) concurrent access to shared structures within the server - the most common being mutexes (o..
2011-11-22 15:57:32
http://space.itpub.net/133735/viewspace-684361
 
mysql  performance_schema 初探:





mysql 5.5 版本 新增了一个性能优化的引擎: PERFORMANCE_SCHEMA



这个功能默认是关闭的:



..
类别:MySQL|阅读(276)|回复(0)|(0)阅读全文>>
2011-11-17 17:23:04
DBD::mysql 安装可以指定mysql配置文件  --mysql_config
安装时候无非就是 找不到include,找不到lib(lib目录输出到/etc/ld.so.conf)
[root@wangyufeng cgi]# perl test.cgi

Content-Type:text/htm..
2011-11-17 13:19:40
今天在公司电脑上安装Apache,版本2.2.8,装完刚测试可以;配置了下php的php.in文件再次localhost打开发现错 误:HTTP 错误 403 - 禁止访问,即 403 Forbidden:You don't ha..
2011-11-15 16:14:34
centos 6.0默认安装
直接使用
 
http://linuxdev.biz/content/10-practical-sar-usage-examples
10 Practical Sar Usage Examples
There are two ways to invoke sar.

sar followed by an opti..
2011-11-14 17:54:03
http://blog.csdn.net/xjl1985/article/details/6210618
 
 
自己整理的mysql status字段信息
分类: mysql 2011-02-26 23:46 112人阅读 评论(0) ..
类别:MySQL|阅读(17)|回复(0)|(0)阅读全文>>

http://www.linuxde.net/2011/09/808.html
如何避免MySQL使用Linux的SWAP分区
2011 年 09 月 16 日 by 天明 | 暂无评论 | 336 次阅读

Linux有很多..
2011-11-13 12:39:43
http://www.dbanotes.net

http://www.mysqlperformanceblog.com/
http://www.orczhou.com/
http://www.penglixun.com/tech/program/how_to_mysql_multi_master.html
http://isky000.com/category/database
..
2011-11-12 23:58:31
中文手册
http://hadoop.apache.org/common/docs/r0.20.2/cn/
 
http://arch.huatai.me/?p=347

Tags:Hadoop,云存储,分布式文件系统 Posted in 云存储 Leave a Comment
参考

Pro hadoop
..
 <<   1   2   3   4   5   >>   页数 ( 1/7 )