Friday, 5 May 2017

Oracle: parallel query historical data

We know the SQL_ID of the query, at which time it ran and we need to know how many parallel processes were dedicated to our query?

The query below will do it:


select sql_id, px_servers_execs_total, px_servers_execs_delta
from dba_hist_sqlstat  
 where sql_id = '85kha1rsqy8wc'
 and snap_id between 81399 and 81400
   ;

SQL_ID        PX_SERVERS_EXECS_TOTAL PX_SERVERS_EXECS_DELTA
------------- ---------------------- ----------------------
85kha1rsqy8wc                    863                      0
85kha1rsqy8wc                    895                     32

No comments:

Post a Comment