QuestionQ45Verified/Tuning SQL StatementsCopy linkReport a problemAsk AstroTutorSave questionWhich two statements are true about collecting optimizer statistics?Choose twoAExecuting DBMS_STATS.GATHER_DATABASE_STATS while connected to CDB$ROOT gathers object statistics in all open PDBs except PDB$SEED.BExecuting DBMS_STATS.GATHER_DATABASE_STATS while connected to a PDB opened in read/write mode gathers object statistics for that PDB.CExecuting DBMS_STATS.GATHER_DATABASE_STATS while connected to CDB$ROOT gathers object statistics only in CDB$ROOT.DSystem statistics can be gathered only while connected to CDB$ROOT.EExecuting DBMS_STATS.GATHER_DATABASE_STATS while connected to CDB$ROOT gathers object statistics in all open pluggable databases (PDBs)Show AnswerAnswerExplanationDBMS_STATS.GATHER_DATABASE_STATS gathers object statistics in the current container. Thus, running it in a read/write PDB gathers statistics for that PDB, whereas running it in CDB$ROOT gathers root statistics only; the CDB root does not trigger statistics gathering in PDBs.Learn moreOracle DBMS_STATS ReferenceOracle SQL Tuning Guide: Gathering Optimizer StatisticsShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion