BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

 

 

 

 

Monitoring the Use of Oracle Parallel Query

Oracle Tips by Burleson Consulting

There are several STATSPACK tables and v$ views that can be used to monitor the activity of the parallel query background processes. Unfortunately, parallel query activity is only measured at the database level, and you cannot find the specific tables that are the target of the parallel query. Let’s begin by looking at the v$pq_tqstat view, and then we'll see the STATSPACK methods for measuring parallel query activity.

Monitoring Parallel Execution Activity

Oracle provides a v$ view that can be used to show the behavior of individual parallel query processes. The v$pq_tqstat view shows the execution pattern for the parallel query and the use of parallel query slave processes for the query.

Here is the SQL statement to display the most recent parallel query execution details.

pq_server.sql

select
   tq_id,
   server_type,
   process,
   num_rows
from
   v$pq_tqstat
where
   dfo_number =
   (select max(dfo_number)
    from
       v$pq_tqstat)
order by
   tq_id,
   decode (substr(server_type,1,4),
     'Prod', 0, 'Cons', 1, 3)
;

Here is some sample output that was retrieved immediately following a parallel query:

     TQ_ID SERVER_TYP PROCESS      NUM_ROWS
---------- ---------- ---------- ----------
         0 Producer   P003              173
         0 Producer   P001              188
         0 Producer   P004              219
         0 Producer   P002              197
         0 Producer   P000              777
         0 Consumer   QC                796

This listing shows five parallel query “Producer” processes, which translate into parallel query slaves, with the OS process names P000 through P004. In this case, we know that the P000 process is the parallel query coordinator because it is labeled a “Consumer” and because it contains the sum of the rows retrieved by processes P001 through P004. The TQ_ID column refers to the parallel execution step. In the case of this query, we had a single full-table scan, so all values are zero. In a more complex query with a parallel full-table scan, we would see multiple steps in the TQ_ID column.

As a general rule, we look for an equal number of rows processed by each parallel query slave. If a single parallel query slave receives a disproportional amount of rows, then the entire query will take longer to complete. A disproportional distribution can sometimes occur when the CBO statistics are not current because the tables and indexes have changes since last being analyzed. You might also see an uneven distribution of rows when the target table is partitioned and the partitions are of unequal sizes.

The v$pq_tqstat view is most useful when you suspect that a parallelized query is not optimized, and it will provide sufficient detail to show the exact operations within the parallel row extraction process.


This is an excerpt from "Oracle High-Performance SQL Tuning" by Donald K. Burleson, published by Oracle Press.


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

 

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter