Home » RDBMS Server » Performance Tuning » session_cached_cursors (11gr2)
session_cached_cursors [message #513507] Mon, 27 June 2011 22:18 Go to next message
fairdaus
Messages: 14
Registered: May 2009
Location: KL
Junior Member
hi..
I run one sql

column parameter format a29
column value format a7
column usage format a7
select 'session_cached_cursors' parameter, lpad(value, 5) value,
decode(value, 0, ' n/a', to_char(100 * used / value, '9990') || '%') usage
from ( select max(s.value) used from V$STATNAME n, V$SESSTAT s
where n.name = 'session cursor cache count' and s.statistic# = n.statistic# ),
( select value from V$PARAMETER where name = 'session_cached_cursors' )
union all
select 'open_cursors', lpad(value, 5), to_char(100 * used / value, '9990') || '%'
from ( select max(sum(s.value)) used from V$STATNAME n, V$SESSTAT s
where n.name in ('opened cursors current', 'session cursor cache count') and s.statistic# = n.statistic# group by s.sid ),
( select value from V$PARAMETER where name = 'open_cursors' );

and the output is

PARAMETER VALUE USAGE
----------------------------- ------- -------
session_cached_cursors 50 1014%
open_cursors 1500 34%

my question is "usage value" for session_cached_cursors is normal?? or i need to be tuning for session_cached_cursors parameter??
Re: session_cached_cursors [message #513508 is a reply to message #513507] Mon, 27 June 2011 22:22 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

>or i need to be tuning for session_cached_cursors parameter?
You do NOT tune parameters.
At what value does this parameter go from being OK to being "high"?
Is this same value true for every DB & every version release?

You tune SQL statements

[Updated on: Mon, 27 June 2011 22:24]

Report message to a moderator

Re: session_cached_cursors [message #513523 is a reply to message #513507] Tue, 28 June 2011 00:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
fairdaus wrote on Tue, 28 June 2011 05:18
my question is "usage value" for session_cached_cursors is normal?? or i need to be tuning for session_cached_cursors parameter??


From your own query you have a usage of 1014%, so it is very good, what is your concern?
Or maybe you don't understand YOUR query?

Regards
Michel

Re: session_cached_cursors [message #523086 is a reply to message #513523] Thu, 15 September 2011 09:00 Go to previous messageGo to next message
dbaoracleinin
Messages: 19
Registered: November 2010
Location: abc
Junior Member
Michel Cadot and black swan are you here for contributing in solving issues or for only discouraging people,ur replies to this question is just confusing and discouraging person asking question like for fairdaus
,ur making simple things complicated and diverting topic and wasting time and efforts
Re: session_cached_cursors [message #523109 is a reply to message #523086] Thu, 15 September 2011 10:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Instead of blabla, provide a better answer.
Also read and follow OraFAQ Forum Guide.

Regards
Michel
Re: session_cached_cursors [message #523134 is a reply to message #523109] Thu, 15 September 2011 13:55 Go to previous messageGo to next message
John Watson
Messages: 8929
Registered: January 2010
Location: Global Village
Senior Member
I've just run this query:
orcl> column parameter format a29
orcl> column value format a7
orcl> column usage format a7
orcl> select 'session_cached_cursors' parameter, lpad(value, 5) value,
  2  decode(value, 0, ' n/a', to_char(100 * used / value, '9990') || '%') usage
  3  from ( select max(s.value) used from V$STATNAME n, V$SESSTAT s
  4  where n.name = 'session cursor cache count' and s.statistic# = n.statistic# ),
  5  ( select value from V$PARAMETER where name = 'session_cached_cursors' )
  6  union all
  7  select 'open_cursors', lpad(value, 5), to_char(100 * used / value, '9990') || '%'
  8  from ( select max(sum(s.value)) used from V$STATNAME n, V$SESSTAT s
  9  where n.name in ('opened cursors current', 'session cursor cache count') and s.statistic# = n.statistic# group by s.sid ),
 10  ( select value from V$PARAMETER where name = 'open_cursors' );

PARAMETER                     VALUE   USAGE
----------------------------- ------- -------
session_cached_cursors           50      14%
open_cursors                    300       8%

orcl>
I'm not sure what it is telling me.
@fairdaus, please can you explain?

Re: session_cached_cursors [message #523193 is a reply to message #523134] Fri, 16 September 2011 02:27 Go to previous messageGo to next message
dbaoracleinin
Messages: 19
Registered: November 2010
Location: abc
Junior Member

PARAMETER VALUE USAGE
----------------------------- ------- -------
session_cached_cursors 50 14%
open_cursors 300 8%


open_cursors-(at sql prompt show parameter open_cursors)
cursor opens in application,value column telling
total configured (init.ora) and usage saying how much % of its currently being used ,8% in your case


session_cached_cursors-there many cursors which are opened and closed by application,some are reused,depending on which of cursors being reused (3 times),oracle put into cache for future use again this is session_cached_cursors,
in above query result value-50 (at sql prompt show parameter session_cached_cursors) is configured on your database
and 14% is used in current sessions(this may change during
different time depending on usage)

increasing this will take more memory from shared pool
Re: session_cached_cursors [message #523208 is a reply to message #523193] Fri, 16 September 2011 04:05 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
You did notice fairdaus got a usage of 1014% didn't you?
Re: session_cached_cursors [message #523209 is a reply to message #523208] Fri, 16 September 2011 04:08 Go to previous messageGo to next message
dbaoracleinin
Messages: 19
Registered: November 2010
Location: abc
Junior Member
yes i did,i used sample 14% for explanation
Re: session_cached_cursors [message #523210 is a reply to message #523209] Fri, 16 September 2011 04:10 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Didn't the value of 1014% suggest to you that the calculation is just wrong?
Re: session_cached_cursors [message #523251 is a reply to message #523210] Fri, 16 September 2011 07:19 Go to previous messageGo to next message
dbaoracleinin
Messages: 19
Registered: November 2010
Location: abc
Junior Member
try this out:

olumn parameter format a29
column value format a5
column usage format a5
select 'session_cached_cursors' parameter, lpad(value, 5) value,
decode(value, 0, ' n/a', to_char(100 * used / value, '990') || '%') usage
from ( select max(s.value) used from V$STATNAME n, V$SESSTAT s
where n.name = 'session cursor cache count' and s.statistic# = n.statistic# ),
( select value from V$PARAMETER where name = 'session_cached_cursors' )
union all
select 'open_cursors', lpad(value, 5), to_char(100 * used / value, '990') || '%'
from ( select max(sum(s.value)) used from V$STATNAME n, V$SESSTAT s
where n.name in ('opened cursors current', 'session cursor cache count') and s.statistic# = n.statistic# group by s.sid ),
( select value from V$PARAMETER where name = 'open_cursors' );










but i think fairdus is seeking explanation on this parameter values returned from the view instead of bothering actual values
(trying to interpret output)

Re: session_cached_cursors [message #523271 is a reply to message #523251] Fri, 16 September 2011 08:25 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.

Regards
Michel
Previous Topic: select partition issue
Next Topic: query taking long time
Goto Forum:
  


Current Time: Sat Apr 20 10:42:35 CDT 2024