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,
hugo
May 11, 2016 - 1:12 am UTC
Looks like you've hit a bug:
From MOS:
Performance Issues While Monitoring the Unified Audit Trail of an Oracle12c Database (Doc ID 2063340.1)
SYMPTOMS
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.
CAUSE
This is a known issue:
bug 21119008 "POOR QUERY PERFORMANCE ON UNIFIED_AUDIT_TRAIL"
SOLUTION
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.
Revoke privileges from Public took too long
Youheng Chhieng, February 16, 2024 - 9:13 am UTC
I have using query to revoke execute from public but it took too long
REVOKE EXECUTE ON UTL_HTTP FROM PUBLIC;
February 20, 2024 - 3:06 pm UTC
What do you mean "took too long"? What exactly happened?
Note that if you have APEX installed, it expects PUBLIC to have access to UTL_HTTP. In this case you either need to leave it granted to public or grant the APEX users access to it (FLOWS_NNNNNN / APEX_NNNNNN)