- 浏览: 1019671 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (529)
- 服务器 (8)
- jsp (1)
- java (6)
- AIX (1)
- solaris (3)
- linux学习 (53)
- javaScript (2)
- hibernate (1)
- 数据库 (74)
- sql语句 (8)
- oracle 学习 (75)
- oracle 案例 (42)
- oracle 管理 (42)
- Oracle RAC (27)
- oracle data guard (12)
- oracle 参数讲解 (14)
- Oracle 字符集 (8)
- oracle性能调优 (24)
- oracle备份与恢复 (12)
- oracle Tablespace (9)
- oracle性能诊断艺术 (1)
- oracle 11g学习 (5)
- oracle streams (1)
- oracle upgrade and downgrade (4)
- db2学习 (13)
- db2命令学习 (2)
- mysql (28)
- sql server (30)
- sql server 2008 (0)
- 工具 (10)
- 操作系统 (3)
- c++ (1)
- stock (1)
- 生活 (5)
- HADOOP (2)
最新评论
-
massjcy:
...
如何将ubuntu文件夹中文名改为英文 -
skypiea:
谢谢。。。
终于解决了。。。
Oracle 10.2.0.4(5)EM不能启动的解决方案(Patch 8350262) -
qwe_rt:
引用vi /etc/sysconfig/network 请问 ...
Linux操作系统下配置静态IP上网 -
liuqiang:
sudo killall -9 apache2
ps 和 kill 命令详解 -
dazuiba:
引用*绝杀 kill -9 PID 当使用此命令时,一定要通过 ...
ps 和 kill 命令详解
Read By Other Session
Definition: When information is requested from the database, Oracle will first read the data from disk into the database buffer cache. If two or more sessions request the same information, the first session will read the data into the buffer cache while other sessions wait. In previous versions this wait was classified under the "buffer busy waits" event. However, in Oracle 10.1 and higher this wait time is now broken out into the "read by other session" wait event. Excessive waits for this event are typically due to several processes repeatedly reading the same blocks, e.g. many sessions scanning the same index or performing full table scans on the same table. Tuning this issue is a matter of finding and eliminating this contention.
Finding the contention
When a session is waiting on this event, an entry will be seen in the v$session_wait system view giving more information on the blocks being waited for:
SELECT p1 "file#", p2 "block#", p3 "class#" |
||
If information collected from the above query repeatedly shows that the same block, (or range of blocks), is experiencing waits, this indicates a "hot" block or object. The following query will give the name and type of the object:
SELECT relative_fno, owner, segment_name, segment_type |
||
Eliminating contention
Depending on the database environment and specific performance situation the following variety of methods can be used to eliminate contention:
-
Tune inefficient queries - This is one of those events you need to "catch in the act" through the v$session_wait view as prescribed above. Then, since this is a disk operating system issue, take the associated system process identifier (c.spid) and see what information we can obtain from the operating system.
-
Redistribute data from the hot blocks –deleting and reinserting the hot rows will often move them to a new data block. This will help decrease contention for the hot block and increase performance. More information about the data residing within the hot blocks can be retrieved with queries similar to the following:
SELECT data_object_id
FROM dba_objects
WHERE owner='&owner' AND object_name='&object';
SELECT dbms_rowid.rowid_create(1,<data_object_id>,<relative_fno>,<block>,0) start_rowid
FROM dual;
--rowid for the first row in the block
SELECT dbms_rowid.rowid_create(1,<data_object_id>,<relative_fno>,<block>,500) end_rowid
FROM dual;
--rowid for the 500th row in the block
SELECT <column_list>
FROM <owner>.<segment_name>
WHERE rowid BETWEEN <start_rowid> AND <end_rowid> -
Adjust PCTFREE and PCTUSED – adjusting the PCTFREE value downward for an object will reduce the number of rows physically stored in a block. Adjusting the PCTUSED value for an object keeps that object from getting prematurely put back on the freelist.
Depending on the type of contention, adjusting these values could help distribute data among more blocks and reduce the hot block problem. Be careful to optimize these parameters so blocks do move in and out of the freelist too frequently.
-
Reduce the Block Size – this is very similar to adjusting the PCTFREE and PCTUSED parameters in that the goal is to reduce the amount of data stored within one block. In Oracle 9i and higher this can be achieved by storing the hot object in a tablespace with a smaller block size. In databases prior to Oracle 9i the entire database must be rebuilt with a smaller block size.
-
Optimize indexes – a low cardinality index has a relatively small number of unique values, e.g. a column containing state data with only 50 values. Similar to inefficient queries, the use of a low cardinality index could cause excessive number of blocks to be read into the buffer cache and cause premature aging out of "good" blocks.
Conclusion
When a session waits on the "read by other session" event, it indicates a wait for another session to read the data from disk into the Oracle buffer cache. If this happens too often the performance of the query or the entire database can suffer. Typically this is caused by contention for "hot" blocks or objects so it is imperative to find out which data is being contended for. Once that is known this document lists several alternative methods for solving the issue.
发表评论
-
Oracle enterprise linux 6.0 安装oracle 11g 所需要的包安装
2012-07-22 08:02 7688Linux 版本是Oracle enterprise ... -
Oracle10gR2 中 Oracle Wallet 的初步使用和维护
2011-06-02 01:59 19891) Wallet作用 从Oracle10gR2开始, 通过 ... -
如何手工删除oracle数据库和软件
2011-06-02 00:29 1457一、手工删库和数据库文件有时候,有可能在dbca图形界面中找不 ... -
AIX下设置Oracle10g随机启动,随机关闭的步骤
2011-06-02 00:19 1449假如ORACLE_HOME为/opt/app/oracle/p ... -
数据库突然无法登陆,只有sysdba可以
2011-05-20 18:05 1646数据库突然无法登陆,只有sysdba可以登陆。 检查aler ... -
Linux安装Oracle报Checking operating system version must be redhat-3, SuSE-9, redhat
2011-03-24 01:26 1919在Linux系统中安装oralce的过程中,如果Linux发行 ... -
How To Update NLS_SORT Parameter Value When Using 10g Thin JDBC Driver ? [ID 469
2010-12-17 10:05 2961Applies to: JDBC - Version: 1 ... -
使用SQL_TRACE进行数据库诊断(转自eygle)
2010-12-16 17:30 860SQL_TRACE是Oracle提供的用 ... -
oracle 查询时忽略大小写的方案研究
2010-12-15 02:00 2482项目已经开发完毕,由于业务变动,某些查询需要忽略大小写,研究是 ... -
必须引起DBA重视的Oracle数据库碎片
2010-12-01 17:35 1009目前,Oracle已经广泛的应用于各个行业。作为一名DBA,及 ... -
Wait Event: cache buffers chains
2010-11-30 15:58 1161cache buffers chains是相对比较常见的冲突事 ... -
log file sync(日志文件同步) 与 Log file parallel write 等待事件
2010-11-28 20:47 2142log file sync(日志文件同步)等待事件具有一个参数 ... -
删除Linux非rac环境下的ASM实例
2010-04-25 01:48 2017环境说明: 操作系统:CentOS 5 x86数据库:O ... -
扩大oracle最大session数以及清除inactive会话
2010-04-12 16:00 7328从上周起,服务器Oracle数据库出现问题,用不到半天,就会报 ... -
设计数据库时需要考虑的问题
2010-03-04 17:34 1536成功的管理系统=50% 的业务+(25%的数据库+25%的程序 ... -
介绍Oracle数据库锁的种类及研究
2009-12-02 09:30 1110本文通过对Oracle数据库锁机制的研究,首先介绍了Oracl ... -
expdp中使用连接字符串和network_link的区别
2009-12-01 11:47 1571expdp属于服务端工具,而exp属于客户端工具,expdp生 ... -
ora10G 使用数据泵(EXPDP和IMPDP)时应该注意的事项
2009-12-01 11:45 1245Oracle Database 10g引入了最新的数据泵(Da ... -
使用Oracle 10g数据泵(EXPDP/IMPDP)
2009-12-01 11:22 2027一、关于数据泵的概述 在Oracle 10 ... -
10g新特性之-expdp与传统exp的速度比较
2009-12-01 11:18 1304测试环境: System Configuration: Su ...
相关推荐
通过数据库环境介绍、问题分析过程、AWR 报表分析和 ASH 报表分析,最终定位到问题的根源是 read by other session 的等待事件,并找到导致问题的两个 SQL 语句。 知识点一:数据库环境介绍 * 数据库环境:RAC ...
在新版本中,针对第二个场景(读取由其他会话读取中的数据块)已独立为“read by other session”。Buffer Busy Waits通常与热点块(Hot Blocks)相关,即多个用户频繁访问相同的数据块。如果等待时间过长,它会在...
events that someone is read by other session - ash [duration] [-f ] active session history for specified period e.g. 'ash 30' to display from [now - 30min] to [now] e.g. 'ash 30 10 -f foo.txt' ...
FTP Serv-U offers the following: ... * Log file can be read by other applications while open, or transferred through FTP Serv-U. * It is dirt cheap, only around 0.1ct per line of code!
Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Table of Contents If you're viewing this document online, you can click any of the topics below to link ...
An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; foo = ; sets foo to an empty string ; foo = None ; sets foo to an empty string ;...
To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...
This specification was developed in response to a perceived need for a standardized programming inter-face to digitizing tablets, three dimensional position sensors, and other pointing devices by a ...
By caching virtual blocks, the cache manager can reduce disk I/O and provide intelligent read ahead. Represented by Memory:Cache Resident bytes. For more information, see also… Inside Windows 2000...
RPC interface in Microsoft Windows. <br>Using a null session, an attacker could make an RPC request to the PnP interface on a Microsoft Windows system that could potentially execute arbitrary code....
其中,1是执行权(Execute),2是写权限(Write),4是读权限(Read), 具体权限相当于三种权限的数相加,如7=1+2+4,即拥有读写和执行权。 另外,临时文件/目录的权限为rwt,可写却不可删,关机后自动删除;建临时目录...
programs and manuals, read this file in its entirety. TABLE OF CONTENTS ----------------- 1. How to Get Help 2. Installation 3. Features 4. Important Information 5. Testing Your Expanded Memory 6. ...
programs and manuals, read this file in its entirety. TABLE OF CONTENTS ----------------- 1. How to Get Help 2. Installation 3. Features 4. Important Information 5. Testing Your Expanded Memory 6. ...
### ASP.NET MVC in Action: Key Insights and Knowledge Points ... Whether you're just starting out with ASP.NET MVC or looking to take your skills to the next level, this book is a must-read.
ICS has been designed by Fran鏾is PIETTE but many other peoples are working on the components and sample programs. The history of changes in each source file list all developers having contributed ...
Session Actions can display feedback by writing dbms_output. Other enhancements Function keys have been added for “Search Bar” functions (Focus, Search, Go to next, Go to previous). Substitution ...
Session Actions can display feedback by writing dbms_output. Other enhancements Function keys have been added for “Search Bar” functions (Focus, Search, Go to next, Go to previous). Substitution ...
- The script to which the character belongs is supported by the JRE installation on which SQL Developer is running � for example, appropriate fonts are available � and - The script does not ...
9.1.7. Mixing implicit polymorphism with other inheritance mappings 9.2. Limitations 10. Working with objects 10.1. Hibernate object states 10.2. Making objects persistent 10.3. Loading an object 10.4...