Oracle 1Z0-054-2
Oracle 1Z0-054-2
Exam
: 1Z0-054
Title
Version : Demo
http://www.test4actual.com
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
-1-
View the Exhibit exhibit2 to examine the plans available in the SQL plan baseline.
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
-2-
The first plan (in red) is created when OPTIMIZER_MODE is set to ALL_ROWS and the second plan (in
blue) is created when OPTIMIZER_MODE is set to FIRST_ROWS.
Which SQL plan baseline would be used if the SQL query in exhibit1 is executed again when the value of
OPTIMIZER_MODE is set to FIRST_ROWS?
A. the second plan, because it is a fixed plan
B. the first plan, because it is an accepted plan
C. the second plan, because it is the latest generated plan in FIRST_ROW mode
D. A new plan, because the second plan in FIRST_ROW mode is not an accepted plan
ANSWER: B
3. You work as a DBA for a company and you have the responsibility of managing one of its online
transaction processing (OLTP) systems. The database encountered performance-related problems and
you generated an Automatic Workload Repository (AWR) report to investigate it further.
View the Exhibits and examine the AWR report.
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
-3-
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
-4-
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
-5-
-6-
You diagnosed that this is due to different kinds of workloads and this occurs only during peak hours. You
tried to resize this by shrinking the database buffer cache but that caused inadequate buffer cache
problems. The following are the related parameter settings:
SQL> show parameter sga
NAME TYPE VALUE
------------------------------ --------------- ----------------lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 300M
sga_target big integer 0
SQL> show parameter target
NAME TYPE VALUE
------------------------------ --------------- ----------------| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
-7-
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
-8-
-9-
- 10 -
What could be the reason for it? (Choose all that apply.)
A. The OPTIMIZER_INDEX_COST_ADJ initialization parameter has a low value.
B. The DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter has a low value.
C. The statistics for the table and all the indexes associated with the table are not current.
D. The table has less than DB_FILE_MULTIBLOCK_READ_COUNT blocks under the high-water mark.
ANSWER: CD
15. Examine the initialization parameter values for the instance given below:
NAME TYPE VALUE
------------------------------------ ----------- -----------------optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.1.0.6
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
db_file_multiblock_read_count integer 64
You notice that the one of the queries is using a full table scan (view Exhibit1) instead of index unique
scan (view Exhibit2). The index is present on the column that is accessed in the WHERE clause of the
query. The cost for a full table scan is more than that for an index unique scan.
Why would the optimizer choose full table scan over index unique scan? (Choose all that apply.)
A. The OPTIMIZER_INDEX_COST_ADJ initialization parameter is set to a low value.
B. The OPTIMIZER_INDEX_COST_ADJ initialization parameter is set to a high value.
C. The DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a low value.
D. The statistics for the table and all the indexes associated with the table are not current.
ANSWER: BD
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.
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 11 -
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.
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 12 -
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?
A. Set the STATISTICS_LEVEL parameter to ALL.
B. Set the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE.
C. Create extended statistics for the CUST_STATE_PROVINCE and COUNTRY_ID columns.
D. Increase the STALE_PERCENT value for the CUSTOMERS table by using the
DBMS_STATS.SET_TABLE_PREFS procedure.
ANSWER: C
18. View Exhibit1 to examine the description of the CUSTOMERS table.
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 13 -
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.
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 14 -
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 15 -
Why is the query using a full table scan instead of an index scan?
A. because the histogram statistics for the COUNTRY_ID column are not updated
B. because the index statistics for the index on the COUNTRY_ID column are not current
C. because the DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a higher value
D. because 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.
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 16 -
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?
A. because the histogram statistics for the COUNTRY_ID column are not updated
B. because the DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a high value
C. because 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
D. because indexes on CUST_GENDER and COUNTRY_ID columns are of different types, the index on
the CUST_GENDER column is bitmap index, and on COUNTRY_ID columns is btree index.
ANSWER: C
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 17 -
| English | Chinese
Chinese((Traditional
Traditional)) | Chinese
Chinese((Simplified
Simplified))
- 18 -