exam questions

Exam 1z0-083 All Questions

View all questions & answers for the 1z0-083 exam

Exam 1z0-083 topic 1 question 22 discussion

Actual exam question from Oracle's 1z0-083
Question #: 22
Topic #: 1
[All 1z0-083 Questions]

Which two are true about gathering optimizer statistics? (Choose two.)

  • A. Executing DBMS_STATS.GATHER_DATABASE_STATS while connected to CDB$ROOT gathers object statistics in all open PDBs except PDB$SEED.
  • B. Executing DBMS_STATS.GATHER_DATABASE_STATS while connected to a PDB opened in read/write mode gathers object statistics for that PDB.
  • C. Executing DBMS_STATS.GATHER_DATABASE_STATS while connected to CDB$ROOT gathers object statistics only in CDB$ROOT.
  • D. System statistics can be gathered only while connected to CDB$ROOT.
  • E. Executing DBMS_STATS.GATHER_DATABASE_STATS while connected to CDB$ROOT gathers object statistics in all open pluggable databases (PDBs)
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
antoniomariano1983
Highly Voted 2 years, 7 months ago
Selected Answer: BC
BC test: SQL> select count(*) from sys.dba_tab_statistics where last_analyzed is not null; COUNT(*) ---------- 3610 SQL> EXEC DBMS_STATS.GATHER_DATABASE_STATS; PL/SQL procedure successfully completed. SQL> select count(*) from sys.dba_tab_statistics where last_analyzed is not null; COUNT(*) ---------- 3649 SQL> alter session set container=ORCLPDB1; Session altered. SQL> select count(*) from sys.dba_tab_statistics where last_analyzed is not null; COUNT(*) ---------- 3507 SQL> EXEC DBMS_STATS.GATHER_DATABASE_STATS; PL/SQL procedure successfully completed. SQL> select count(*) from sys.dba_tab_statistics where last_analyzed is not null; COUNT(*) ---------- 3598
upvoted 7 times
...
ABAJ
Highly Voted 3 years, 7 months ago
BC are correct. Tested in LAB.
upvoted 6 times
fiko666
3 years ago
How can you test that?
upvoted 2 times
...
...
cujar2003
Most Recent 2 months, 1 week ago
Selected Answer: BE
B y E Test in my LAB 19C SQL> select max(last_analyzed) from sys.dba_tab_statistics; MAX(LAST_ANALYZED) ------------------ 14-OCT-24 SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDBDEV READ WRITE NO SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> EXEC DBMS_STATS.GATHER_DATABASE_STATS; PL/SQL procedure successfully completed. SQL> select max(last_analyzed) from sys.dba_tab_statistics; MAX(LAST_ANALYZED) ------------------ 04-NOV-24 SQL> alter session set container=PDBDEV; Session altered. SQL> select max(last_analyzed) from sys.dba_tab_statistics; MAX(LAST_ANALYZED) ------------------ 04-NOV-24 SQL>
upvoted 1 times
...
Guhborges
1 year, 6 months ago
Selected Answer: BC
B and C are correct.
upvoted 1 times
...
Alvinzzz
1 year, 7 months ago
For option C, the tricky point is the word "only. When connected to CDB$ROOT, you can also collect object statistics at PDB level if specified. For option D, all containers under the CDB share the same hardware. I can't see why it was incorrect as DBMS_STATS.GATHER_SYSTEM_STATS should be executed at CDB level and applies to the PDBs under it.
upvoted 1 times
...
ScottL
1 year, 8 months ago
Selected Answer: BC
BC correct
upvoted 1 times
...
_gio_
1 year, 8 months ago
Selected Answer: BC
I think BC
upvoted 1 times
...
jareach
1 year, 11 months ago
Selected Answer: BC
Suggested CE are mutuallz exclusive.
upvoted 2 times
...
Kushal22
1 year, 12 months ago
BC is correct .https://docs.oracle.com/en/database/oracle/oracle-database/21/arpls/DBMS_STATS.html#GUID-9761DFB9-8710-45D9-9ACE-A4FD37FD69F5 The application PDB user, uses this preference to determine whether to allow the application root to interact with the statics gathering in PDB. During the statistics gathering of a metadata linked table in the application root, if the statistics in a PDB are in stale state, the application root triggers the statistics gathering for the particular PDB. Using this preference, the user can either execute or ignore the command from the application root. You can set the following values: TRUE—Allows the application root trigger the statistics gathering on metadata linked table in application PDB if the statistics on PDB are stale. FALSE—Ignores the statistics gathering command triggered from application root. The default value is FALSE. Note: CDB root, different from application root, never triggers statistics gathering on the PDBs and it is not controlled by this preference.
upvoted 1 times
...
chefdba
3 years, 2 months ago
BC = 100% correct
upvoted 2 times
...
rashedptdba
3 years, 3 months ago
B,C are correct answer. Tested on my lab
upvoted 2 times
...
Neil107
3 years, 5 months ago
B and E
upvoted 2 times
...
navingupta52
3 years, 6 months ago
B & C are correct. Tested on my system.
upvoted 3 times
...
ObserverPL
3 years, 7 months ago
B is obvious, also C is true as I've just tested in practice on 19c - EXEC DBMS_STATS.GATHER_DATABASE_STATS launched on CDB$ROOT did NOT calculated stats on PDB1:EMP table I created.
upvoted 3 times
...
cerebro2000x
4 years, 5 months ago
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 HR READ WRITE NO SQL> alter session set container = PDB$SEED; Session altered. SQL> show con_name CON_NAME ------------------------------ PDB$SEED SQL> select count(*) from sys.dba_tab_statistics where last_analyzed is not null; COUNT(*) ---------- 2290 SQL> EXEC DBMS_STATS.GATHER_DATABASE_STATS; BEGIN DBMS_STATS.GATHER_DATABASE_STATS; END; * ERROR at line 1: ORA-20000: database or pluggable database open for read-only access ORA-06512: at "SYS.DBMS_STATS", line 42559 ORA-06512: at "SYS.DBMS_STATS", line 42521 ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 17263 ORA-06512: at "SYS.DBMS_STATS", line 42414 ORA-06512: at "SYS.DBMS_STATS", line 42549 ORA-06512: at line 1
upvoted 2 times
...
janw
4 years, 5 months ago
BC: https://mikedietrichde.com/2016/10/21/gather-fixed-objects-stats-in-pdbs-as-well/
upvoted 2 times
...
dacoben415lywenw
4 years, 6 months ago
corect BC tested on 19c and 12.2 test provided by ald85 is not accurate, E is not corect try creating simple tales in ROOT and PDB than gather db stats from ROOT, and you will see that PDB tables stats will not be gathered.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago