DBA Data[Home] [Help]

VIEW: SYS.DBA_OPTSTAT_OPERATION_TASKS

Source

View Text - Preformatted

select op_id, target, target_objn,
         case target_type when 1 then 'TABLE'
                          when 2 then 'TABLE (GLOBAL STATS ONLY)'
                          when 3 then 'TABLE (COORDINATOR JOB)'
                          when 4 then 'TABLE PARTITION'
                          when 5 then 'TABLE SUBPARTITION'
                          when 6 then 'INDEX'
                          when 7 then 'INDEX PARTITION'
                          when 8 then 'INDEX SUBPARTITION'
                          else to_char(target_type) end target_type,
         target_size, start_time, end_time,
         case status when 0 then 'PENDING'
                     when 1 then 'IN PROGRESS'
                     when 2 then 'COMPLETED'
                     when 3 then 'FAILED'
                     when 4 then 'SKIPPED'
                     when 5 then 'TIMED OUT'
              else 'UNKNOWN: ' || status end status,
         job_name, estimated_cost,
         batching_coeff, actions, priority, flags, notes
  from sys.wri$_optstat_opr_tasks
View Text - HTML Formatted

SELECT OP_ID
, TARGET
, TARGET_OBJN
, CASE TARGET_TYPE WHEN 1 THEN 'TABLE' WHEN 2 THEN 'TABLE (GLOBAL STATS ONLY)' WHEN 3 THEN 'TABLE (COORDINATOR JOB)' WHEN 4 THEN 'TABLE PARTITION' WHEN 5 THEN 'TABLE SUBPARTITION' WHEN 6 THEN 'INDEX' WHEN 7 THEN 'INDEX PARTITION' WHEN 8 THEN 'INDEX SUBPARTITION' ELSE TO_CHAR(TARGET_TYPE) END TARGET_TYPE
, TARGET_SIZE
, START_TIME
, END_TIME
, CASE STATUS WHEN 0 THEN 'PENDING' WHEN 1 THEN 'IN PROGRESS' WHEN 2 THEN 'COMPLETED' WHEN 3 THEN 'FAILED' WHEN 4 THEN 'SKIPPED' WHEN 5 THEN 'TIMED OUT' ELSE 'UNKNOWN: ' || STATUS END STATUS
, JOB_NAME
, ESTIMATED_COST
, BATCHING_COEFF
, ACTIONS
, PRIORITY
, FLAGS
, NOTES
FROM SYS.WRI$_OPTSTAT_OPR_TASKS