A little more information
hugo alves, May 10, 2016 - 4:30 pm UTC
First of all, thank you very much for your quick response.
The query executed was a "simple" 'select count(*) from UNIFIED_AUDIT_TRAIL;' (as sys).
I know that "UNIFIED_AUDIT_TRAIL" is a view and not a table, but I wasn't expecting the query to take so long.
Like I said before, reading the entire table should take around 200 seconds, a little over three minutes. Under the covers, this view is in fact made of a combination of partitioned tables, indexes and LOBs. Could this be a explanation for the behavior I'm seeing?
Thank you very much,
May 11, 2016 - 1:12 am UTC
Looks like you've hit a bug:
Performance Issues While Monitoring the Unified Audit Trail of an Oracle12c Database (Doc ID 2063340.1)
While using EM Cloud Control 12c to monitor the Unified audit trail of an Oracle12c database, you observe high CPU usage.
The problem may also be observed from SQL*Plus when querying the UNIFIED_AUDIT_TRAIL view. If there are a large number of audit records in the Unified audit trail then query performance can be really slow.
After the Unified audit trail is purged using the DBMS_AUDIT_MGMT package, the CPU usage is much less.
This is a known issue:
bug 21119008 "POOR QUERY PERFORMANCE ON UNIFIED_AUDIT_TRAIL"
Development have investigated the issue and state that the bug is not feasible to fix in 12.1, but it will be fixed in 12.2
Thank you very much
hugo alves, May 11, 2016 - 2:23 pm UTC
Thank you very much the information.