Oracle tuning uses related SQL, oracle tuning related SQL
Select * from v $ session where username is not null;
Select username, count (username) from v $ session where username is not null group by username;
Select count (*) from v $ process;
Select value from v $ parameter where name = 'processs ';
Select count (*) from v $ session where status = 'active ';
Select name, VALUE, DISPLAY_VALUE from v $ parameter where name = 'spfile ';
Select count (1) FROM v $ spparameter where value is not null;
Select user_name, count (user_name) from v $ open_cursor group by user_name;
Select max (A. VALUE) AS HIGHEST_OPEN_CUR, P. value as MAX_OPEN_CUR
From v $ sesstat a, V $ statname B, V $ parameter p where a. STATISTIC # = B. STATISTIC #
And B. NAME = 'opened cursors current' AND P. NAME = 'open _ cursors 'GROUP BY P. VALUE;
Select. VALUE, S. USERNAME, S. SID, S. SERIAL # from v $ sesstat a, V $ statname B, V $ SESSION S WHERE. STATISTIC # = B. STATISTIC #
And s. SID = A. sid and B. NAME = 'opened cursors curent ';
Select name, value from v $ sysstat where name like '% cursor % ';
Select name, value from v $ sysstat where name like '% parse % ';
SELECT 'session _ cached_cursors 'PARAMETER, LPAD (VALUE, 5) VALUE,
DECODE (VALUE, 0, 'n'/A', TO_CHAR (100 * USED/VALUE, '000000') | '%') 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, '000000') |' % '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 ');