1z0-062 Exam QuestionsBrowse all questions from this exam

1z0-062 Exam - Question 42


You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema.

Examine the following steps:

1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (SH, CUSTOMERS) FROM dual statement.

2. Execute the DBMS_STATS.SEED_COL_USAGE (null, SH, 500) procedure.

3. Execute the required queries on the CUSTOMERS table.

4. Issue the SELECT DBMS_STATS.REPORT_COL_USAGE (SH, CUSTOMERS) FROM dual statement.

Identify the correct sequence of steps.

Show Answer
Correct Answer: B

To capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema, the correct sequence of steps is as follows: First, execute the DBMS_STATS.SEED_COL_USAGE (null, SH, 500) procedure, which tells Oracle how long it should observe the workload to determine appropriate column groups. Then, execute the required queries on the CUSTOMERS table to ensure that column usage information is recorded. After that, issue the SELECT DBMS_STATS.REPORT_COL_USAGE (SH, CUSTOMERS) FROM dual statement to report column usage information and verify which columns have been used together. Finally, create the column groups by issuing the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (SH, CUSTOMERS) FROM dual statement, which will maintain statistics for each column group whenever statistics are gathered on the table.

Discussion

1 comment
Sign in to comment
PashaAllahverdi
Apr 26, 2022

https://oracle-base.com/articles/11g/extended-statistics-enhancements-11gr2