Oracle 1z0-054 Exam Practice Questions (P. 4)
- Full Access (192 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #16
The columns CUST_CITY, CUST_STATE_PROVINCE, and COUNTRY_ID are frequently used together in the WHERE clause of the queries. The CUSTOMERS table is a big table with 20 GB of data. You notice that the selectivity for these three columns varies from the selectivity that the optimizer calculates. What would you recommend to influence the selectivity calculated by the optimizer?
- Acreating function-based indexes by concatenating all the columns
- Bupdating histogram statistics for these columns by using the DBMS_STATS.GATHER_TABLE_STATS procedure
- Cusing the DBMS_STATS.CREATE_EXTENDED_STATS function to create a virtual column and create index on the virtual column
- Dusing the DBMS_STATS.CREATE_EXTENDED_STATS function to create a virtual column and the DBMS_STATS.GATHER_TABLE_STATS procedure to
Correct Answer:
D
D
send
light_mode
delete
Question #17
View Exhibit1 to examine the description of the CUSTOMERS table.

You observed that optimizer selectivity is not accurate when the CUST_STATE_PROVINCE and COUNTRY_ID columns are used together in the WHERE clause of a query. View Exhibit2 to examine the query execution plan and the commands executed to gather the statistics.

The optimizer predicts that 20 rows will be processed rather than the 3,341 rows, which is the actual number of rows returned from the table. What can you do to make the optimizer detect the actual number of rows?

You observed that optimizer selectivity is not accurate when the CUST_STATE_PROVINCE and COUNTRY_ID columns are used together in the WHERE clause of a query. View Exhibit2 to examine the query execution plan and the commands executed to gather the statistics.

The optimizer predicts that 20 rows will be processed rather than the 3,341 rows, which is the actual number of rows returned from the table. What can you do to make the optimizer detect the actual number of rows?
- ASet the STATISTICS_LEVEL parameter to ALL.
- BSet the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE.
- CCreate extended statistics for the CUST_STATE_PROVINCE and COUNTRY_ID columns.
- DIncrease the STALE_PERCENT value for the CUSTOMERS table by using the DBMS_STATS.SET_TABLE_PREFS procedure.
Correct Answer:
C
C
send
light_mode
delete
Question #18
View Exhibit1 to examine the description of the CUSTOMERS table.

The CUSTOMERS table has been updated heavily today. In a frequently used SQL statement, you notice that estimated rows and the actual number of rows fetched differ greatly. The COUNTRY_ID column has an index.
View Exhibit2 and examine the query execution plan.

What would you recommend to improve the optimizer's estimation?

The CUSTOMERS table has been updated heavily today. In a frequently used SQL statement, you notice that estimated rows and the actual number of rows fetched differ greatly. The COUNTRY_ID column has an index.
View Exhibit2 and examine the query execution plan.

What would you recommend to improve the optimizer's estimation?
- Asetting the STATISTICS_LEVEL parameter to ALL
- Bsetting the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE
- Ccreating extended statistics for the CUST_LAST_NAME, CUST_ID, and CUST_TOTAL columns
- Dupdating the statistics for the CUSTOMERS table by using the DBMS_STATS.GATHER_TABLE_STATS procedure
Correct Answer:
D
D
send
light_mode
delete
Question #19
You are working on a decision support system (DSS). The index is available on the COUNTRY_ID column of the CUSTOMERS table.View the Exhibit and examine the parameter settings and the query execution plan.

Why is the query using a full table scan instead of an index scan?

Why is the query using a full table scan instead of an index scan?
- Abecause the histogram statistics for the COUNTRY_ID column are not updated
- Bbecause the index statistics for the index on the COUNTRY_ID column are not current
- Cbecause the DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a higher value
- Dbecause the optimizer predicts that most of the blocks in the table are accessed. Therefore, it uses a full table scan, even though indexes are available.
Correct Answer:
D
D
send
light_mode
delete
Question #20
View Exhibit1 and examine the indexes on the CUSTOMERS table.

The statistics for the CUSTOMERS table have been updated recently by using the following command:
SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS('SH','CUSTOMERS',method_opt=>'FOR ALL
INDEXED COLUMNS SIZE AUTO');
View Exhibit2 to examine a query plan. Even though the index is present on the COUNTRY_ID and CUST_GENDER columns, the query uses a full table scan.
What could be the reason?


The statistics for the CUSTOMERS table have been updated recently by using the following command:
SQL> EXEC DBMS_STATS.GATHER_TABLE_STATS('SH','CUSTOMERS',method_opt=>'FOR ALL
INDEXED COLUMNS SIZE AUTO');
View Exhibit2 to examine a query plan. Even though the index is present on the COUNTRY_ID and CUST_GENDER columns, the query uses a full table scan.
What could be the reason?

- Abecause the histogram statistics for the COUNTRY_ID column are not updated
- Bbecause the DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a high value
- Cbecause the optimizer calculates the cost of accessing blocks by using a full table scan to be less as compared to index scans, even though indexes are available
- Dbecause indexes on CUST_GENDER and COUNTRY_ID columns are of different types, the index on the CUST_GENDER column is bitmap index, and on
Correct Answer:
C
C
send
light_mode
delete
All Pages