Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Two questions about resource profiles

Two questions about resource profiles

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Mon, 13 Mar 2006 14:52:40 +0200
Message-ID: <6e49b6d00603130452o697ddec3x@mail.gmail.com>


Hello!

I'm investigating resource profiles to prevent users from running unreasonably long time queries. And specifically CPU_PER_CALL and LOGICAL_READS_PER_CALL. I'v found few rather interesting and even confusing moments.
1. In the first time select is run, it accesses db and when io or cpu threshold is exceeded it performs a fetch, that can bee seen from trace file below, although there is no data from this particular table that satisfies this particular select.
I.e. sqlplus screen looks like
FROM <table_list>

*

ERROR at line 3:
ORA-02393: exceeded call limit on CPU usage Elapsed: 00:00:19.04

But in the tracefile there are following lines: <many db file sequential read WAITS>
WAIT #1: nam='db file sequential read' ela= 24192 p1=42 p2=216658 p3=1 WAIT #1: nam='db file sequential read' ela= 17370 p1=42 p2=1577793 p3=1 FETCH #1:c=797878,e=18566294,p=3060,cr=68984,cu=0,mis=0,r=0,dep=0,og=2,tim=1115479481093872

WAIT #1: nam='SQL*Net break/reset to client' ela= 5 p1=1413697536 p2=1 p3=0
WAIT #1: nam='SQL*Net break/reset to client' ela= 334 p1=1413697536 p2=0 p3=0
WAIT #1: nam='SQL*Net message to client' ela= 4 p1=1413697536 p2=1 p3=0

Why FETCH? What is it? It didn't return any rows.

2. In the first time select got exceeded call limit on CPU usage in 19.04 seconds
In the second time it got exceeded call limit on IO usage in 20.06 seconds In the third time it got exceeded call limit on IO usage in 02.00 seconds In the fourth time it got exceeded call limit on IO usage in 00.04 seconds and tracefile showed no 'db file sequential read' WAITS at all like below:
FROM <table_list>

*

ERROR at line 3:
ORA-02393: exceeded call limit on CPU usage Elapsed: 00:00:19.04
SQL> /
FROM <table_list>

*

ERROR at line 3:
ORA-02395: exceeded call limit on IO usage Elapsed: 00:00:20.06
SQL> /
SELECT <attribute list>
*
ERROR at line 1:
ORA-02395: exceeded call limit on IO usage Elapsed: 00:00:02.00
SQL> /
SELECT <attribute list>
*
ERROR at line 1:
ORA-02395: exceeded call limit on IO usage Elapsed: 00:00:00.04

So the question in this case is following: Is it right that for the fourth time all necessary blocks were in db cache and nothing has to be read from disk therefore no waits? Or there is a chance that Oracle stores somewhere required IO and CPU values for statements and immediately returns error? ;)

Gints

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 13 2006 - 06:52:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US