Skip to main content

Rows processed

  • February 14, 2018
  • 3 replies
  • 10 views

sreeblr
Forum|alt.badge.img+2

from catalog/monitor can we get rows processed per query , time take to run the query ?

3 replies

Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • February 14, 2018

Check QUERY_PROFILES:

Example:

dbadmin=> select /*+ label(mytest) */ * from wide_table limit 3;
 some_unique_key | data_point1 | data_point2 | data_point3 | data_point600
-----------------+-------------+-------------+-------------+---------------
               1 |           1 |             |           1 |             3
               2 |           1 |           1 |             |             3
               2 |           1 |           1 |           1 |             3
(3 rows)

dbadmin=> select processed_row_count, query_duration_us from query_profiles where identifier = 'mytest';
 processed_row_count | query_duration_us
---------------------+-------------------
                   3 |       6605.000000
(1 row)

sreeblr
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • February 15, 2018

thanks Jim.can we link with query requests table and get rows processed per query
?


Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • February 27, 2018

Hi,

You shouldn't need to join to QUERY_REQUESTS. The QUERY_PROFILES table contains the columns QUERY, PROCESSED_ROW_COUNT and QUERY_DURATION_US.

The QUERY column is the query that was executed...

Example:

dbadmin=> select query, processed_row_count, query_duration_us from query_profiles where identifier = 'my_query_test';
                      query                      | processed_row_count | query_duration_us
-------------------------------------------------+---------------------+-------------------
 select /*+ label(my_query_test) */ * from dual; |                   1 |       5631.000000
(1 row)