Skip to Main Content
  • Questions
  • Wait event - "read other by session"

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: April 03, 2016 - 3:56 pm UTC

Last updated: April 04, 2016 - 6:33 am UTC

Version: 11gr2

Viewed 1000+ times

You Asked

Last four days we getting wait event that is read other by session at daily 9 am when client connect to server at a time.

Also Undo tablespace have 3 GB size on HD.

And before four day we move datafile from HD to SSD drive.

But I can't understand what is happen in inside the system.

I also refer contain of the net but don't getting correct solution.

Can you help me?

and Connor said...

SQL> select name from v$event_name
  2  where name like 'read %';

NAME
------------------------------------
read by other session


I'm assuming you mean this one ? You know ... when it comes to diagnosing problems...precision sortta matters :-)

"read by other session" means person "A" is reading something from disk into memory. Person "B" also wants to do the same thing... so that wait for "A" to finish.

When this happens, you want to capture what data was being sought, so you can do this:

SELECT p1 , p2
FROM v$session_wait_history
WHERE event = 'read by other session';

and with those returned values

SELECT *
FROM dba_extents
WHERE file_id = "p1"
AND "p2" BETWEEN block_id AND block_id + blocks - 1;

This will tell you what was being competed for. The *cause* of the contention could be various:

1) bad SQL query, so people are going after the same block over and over and over
2) bad I/O, so the time to do that read is very slow
3) an external influence, eg, some *other* process is reading lots of blocks and constantly pushing the block you want out of memory.

See how you go.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, April 04, 2016 - 4:17 am UTC

Thanks for your valuable Answer.
B
As per above solutions, you mention IO but which IO effect the SQL query.

And Is it possible to find more accurate IO?
Connor McDonald
April 04, 2016 - 6:33 am UTC

Well, if one of the sessions is doing I/O, it will *not* be waiting on 'read by other session' it will be waiting on one of the I/O events, so look for sessions doing:

SQL> select name
  2  from v$event_name
  3  where wait_class = 'User I/O';

NAME
----------------------------------------------------
Parameter File I/O
Disk file operations I/O
Disk file I/O Calibration
Disk file Mirror Read
Disk file Mirror/Media Repair Write
direct path sync
Datapump dump file I/O
dbms_file_transfer I/O
DG Broker configuration file I/O
Data file init write
Log file init write
Shared IO Pool IO Completion
local write wait
buffer read retry
read by other session
db flash cache single block physical read
db flash cache multiblock physical read
db flash cache write
db file sequential read  ***most likely***
db file scattered read   ***most likely***
db file single write
db file parallel read
direct path read
direct path read temp
direct path write
direct path write temp
flashback log file sync
cell smart table scan
cell smart index scan
cell statistics gather
cell smart file creation
Archive Manager file transfer I/O
securefile direct-read completion
securefile direct-write completion
BFILE read
utl_file I/O
external table read
external table write
external table open
external table seek
external table misc IO
dbverify reads
TEXT: File System I/O
ASM Fixed Package I/O
ASM Staleness File I/O
cell single block physical read
cell multiblock physical read
cell list of blocks physical read