Automatic maintenance tasks controls the automatic optimizer statistics
Query to check the current state of jobs in CDB_AUTOTASK_CLIENT of the database, auto optimizer stats collection job is disabled in PDBs. SELECT COALESCE ( p . name , ( SELECT name FROM v $ database )) AS DATABASE , CASE WHEN c . con_id = 1 THEN 'CDB' WHEN c . con_id = 2 THEN 'SEED' ELSE 'PDB' END AS type_db , c . client_name , c . status , c . attributes FROM cdb_autotask_client c LEFT JOIN v $…
The auto optimizer statistics collection job is disabled in PDBs (Portable Database Instances) by default, according to the database configuration. This can be confirmed by querying the CDB_AUTOTASK_CLIENT view, which shows that the job is enabled by default in the CDB (Common Database) but disabled in the PDBs. Specifically, the auto optimizer stats collection job is set to ENABLED ON BY DEFAULT, VOLATILE, SAFE TO KILL in the CDB, while it is DISABLED ON BY DEFAULT, VOLATILE, SAFE TO KILL in both PDB1 and PDB2.
Furthermore, the CDB_AUTOTASK_WINDOW_CLIENTS view reveals the configured windows for autotask activities in each database. In the CDB, all windows (FRIDAY_WINDOW, MONDAY_WINDOW, SATURDAY_WINDOW, SUNDAY_WINDOW, THURSDAY_WINDOW, TUESDAY_WINDOW, and WEDNESDAY_WINDOW) have an autotask status of ENABLED. However, in PDB1, only the FRIDAY_WINDOW has an enabled status, while the other windows are DISABLED. Similarly, in PDB2, all windows are DISABLED.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.