Set up a friendly environment to share my understanding and ideas about Oracle / Oracle Spatial database administration, ESRI ArcSDE Geodatabase administration and UNIX (Solaris) operating system.
V$SEGMENT_STATISTICS displays information about segment-level statistics.
Column
Datatype
Description
OWNER
VARCHAR2(30)
Owner of the object
OBJECT_NAME
VARCHAR2(30)
Name of the object
SUBOBJECT_NAME
VARCHAR2(30)
Name of the subobject
TABLESPACE_NAME
VARCHAR2(30)
Name of the table space to which the object belongs
TS#
NUMBER
Tablespace number
OBJ#
NUMBER
Dictionary object number of the object
DATAOBJ#
NUMBER
Data object number of the object
OBJECT_TYPE
VARCHAR2(18)
Type of the object
STATISTIC_NAME
VARCHAR2(64)
Name of the statistic
STATISTIC#
NUMBER
Statistic number
VALUE
NUMBER
Statistic value
Note:
1.Segment Waits
select object_name
, obj#
, statistic_name
, value
from v$segment_statistics
where owner like '&owner'
and statistic_name like '%waits%'
and value > 0
order by statistic_name
, value desc;
-- find the database table that is accessed the most: query the V$SEGMENT_STATISTICS view for this information by looking for tables that have a high number of physical reads and logical reads
SELECT t.owner,t.table_name,lr.value+pr.value AS total_reads
FROM (SELECT owner, object_name, value FROM v$segment_statistics
WHERE statistic_name='logical reads') lr,
(SELECT owner, object_name, value FROM v$segment_statistics
V$LOCKED_OBJECT lists all locks acquired by every transaction on the system. It shows which sessions are holding DML locks (that is, TM-type enqueues) on what objects and in what mode.
V$LOCK lists the locks currently held by the Oracle Database and outstanding requests for a lock or latch.
Column
Datatype
Description
ADDR
RAW(4 | 8)
Address of lock state object
KADDR
RAW(4 | 8)
Address of lock
SID
NUMBER
Identifier for session holding or acquiring the lock
TYPE
VARCHAR2(2)
Type of user or system lock
The locks on the user types are obtained by user applications. Any process that is blocking others is likely to be holding one of these locks. The user type locks are:
TM - DML enqueue
TX - Transaction enqueue
UL - User supplied
The locks on the system types are held for extremely short periods of time. The system type locks are listed below.
ID1
NUMBER
Lock identifier #1 (depends on type)
ID2
NUMBER
Lock identifier #2 (depends on type)
LMODE
NUMBER
Lock mode in which the session holds the lock:
·0 - none
·1 - null (NULL)
·2 - row-S (SS)
·3 - row-X (SX)
·4 - share (S)
·5 - S/Row-X (SSX)
·6 - exclusive (X)
REQUEST
NUMBER
Lock mode in which the process requests the lock:
·0 - none
·1 - null (NULL)
·2 - row-S (SS)
·3 - row-X (SX)
·4 - share (S)
·5 - S/Row-X (SSX)
·6 - exclusive (X)
CTIME
NUMBER
Time since current mode was granted
BLOCK
NUMBER
A value of either 0 or 1, depending on whether or not the lock in question is the blocker.
I reserve the right to delete comments that are not contributing to the overall theme of the BLOG or are insulting or demeaning to anyone. The posts on this BLOG are provided "as is" with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer.