Document Type | Technical Information
Category | Monitoring/Inspection
Document Number | TMOTI022
Overview
Parallel Query is used to efficiently process large amounts of data. When you want to check the sessions performing parallel queries and their status, you can retrieve relevant information using the following methods.
Method
Check Session Information Performing Parallel Queries
You can check this in the v$px_session session.
You can identify Parent/Child distinction, SID, user information, requested Degree, etc.
select decode(a.qcserial#, null, 'PARENT', 'CHILD') stmt_level, a.sid,
a.serial#,
b.username,
a.degree,
a.req_degree
from v$pe_session a, v$session b
where a.sid = b.sid
order by a.qcsid, stmt_level desc;
Parallel Execution Status Information of Sessions
Whether parallel execution is possible or currently being performed can be checked through the following columns in v$session.
Column | Description |
|---|---|
PDML_STATUS | Shows the current status of parallel DML for the session. |
PDDL_STATUS | Shows the current status of parallel DDL for the session. |
PQ_STATUS | Shows the current status of parallel Query for the session. |
These columns can be set to the values DISABLE, ENABLE, or FORCE.
- ENABLE: Executes parallel statements when a parallel Degree is set in hints or objects.
- DISABLE: Even if the Degree is set with the PARALLEL clause in hints or objects, parallel statements cannot be used.
- FORCE: Forces parallel execution for the SQL statement.
Note
PQ Sessions โ Slave sessions used in parallel can also be queried through v$session and have the same SQL_ID as the QC (Query Coordinator). (Displayed as PE_SLAVE in PROG_NAME.)
Related views: v$pe_pesplan, v$pe_pesstat, v$pe_session, v$pe_tqstat