title: oracle: Is there a way to check what sql_id downgraded to serial or lesser degree over the period of time
body: <p>I would like to know if there is a way to check sql_ids that were downgraded to either serial or lesser degree in an Oracle 4-node RAC Data warehouse, version 11.2.0.3. I want to write a script and check the queries that are downgraded. </p>
  
  <pre><code>SELECT NAME, inst_id, VALUE FROM GV$SYSSTAT
  WHERE UPPER (NAME) LIKE '%PARALLEL OPERATIONS%'
  OR UPPER (NAME) LIKE '%PARALLELIZED%' OR UPPER (NAME) LIKE '%PX%'
  
  NAME                                        VALUE
  queries parallelized                        56083
  DML statements parallelized                     6
  DDL statements parallelized                   160
  DFO trees parallelized                      56249
  Parallel operations not downgraded          56128
  Parallel operations downgraded to serial      951
  Parallel operations downgraded 75 to 99 pct     0
  Parallel operations downgraded 50 to 75 pct     0
  Parallel operations downgraded 25 to 50 pct   119
  Parallel operations downgraded 1 to 25 pct      2
  </code></pre>
  
  <p>Does it ever refresh? What conclusion can be drawn from above output? Is it for a day? month? hour? since startup? </p>