You manage a 19c database with default optimizer settings. This statement is used extensively as subquery in the application queries: SELECT city_id FROM sh2.sales WHERE city_id=:Bl You notice the performance of these queries is often poor and, therefore, execute: SELECT city_id,COUNT(*) FROM sh2.sales GROUP BY city_id; Examine the results: There is no index on the CITY_ID column. Which two options improve the performance?
Correct Answer: A,B
In this scenario, creating an index and generating frequency histograms are two methods that can potentially improve performance: * A (Correct): Generating frequency histograms on the CITY_ID column can help the optimizer make better decisions regarding the execution plan, especially if the data distribution is skewed. Histograms provide the optimizer with more detailed information about the data distribution in a column, which is particularly useful for columns with non-uniform distributions. * B (Correct): Creating an index on the CITY_ID column would speed up queries that filter on this column, especially if it's used frequently in the WHERE clause as a filter. An index would allow for an index range scan instead of a full table scan, reducing the I/O and time needed to execute such queries. * C (Incorrect): While SQL profiles can be used to improve the performance of specific SQL statements, they are usually not the first choice for such a problem, and creating a profile does not replace the need for proper indexing or statistics. * D (Incorrect): Forcing the subquery to use dynamic sampling might not provide a consistent performance benefit, especially if the table statistics are not representative or are outdated. However, dynamic sampling is not as effective as having accurate statistics and a well-chosen index. * E (Incorrect): Adaptive plans can adjust the execution strategy based on the conditions at runtime. While they can be useful in certain scenarios, in this case, creating an index and ensuring accurate statistics would likely provide a more significant performance improvement. References: * Oracle Database SQL Tuning Guide: Managing Optimizer Statistics * Oracle Database SQL Tuning Guide: Using Indexes and Clusters
1z1-084 Exam Question 7
Which application lifecycle phase could be managed reactively?
Correct Answer: D
The production phase of the application lifecycle is often managed reactively. While proactive measures and performance tuning are essential, unforeseen issues can arise in production that require immediate attention and resolution. Reactive management involves monitoring performance and responding to issues as they occur, ensuring the application maintains acceptable performance levels for end-users. References * Oracle Database 19c Performance Tuning Guide - Reactive Tuning
1z1-084 Exam Question 8
Examine this output of a query of VSPGA_TAPGET_ADVICE: Which statements is true'
Correct Answer: D
The query output from V$PGA_TARGET_ADVICE provides tuning information for the PGA (Program Global Area). Let's break it down step by step: Key Columns in the Output: * TARGET_MB: * Represents the hypothetical PGA_AGGREGATE_TARGET values (in megabytes) evaluated by Oracle. * CACHE_HIT_PERC: * The percentage of work areas that could execute in-memory (optimal execution) without requiring temporary disk writes. * Higher percentages indicate fewer work areas requiring disk I/O. * ESTD_OVERALLOC_COUNT: * The estimated number of work areas that need to go to disk (multipass operations or overallocations). Observations from the Data: * At TARGET_MB = 700 MB: * The CACHE_HIT_PERC is 68%. * The ESTD_OVERALLOC_COUNT is 30. This indicates that some multipass work areas still exist. * At TARGET_MB = 800 MB: * The CACHE_HIT_PERC rises to 74%. * The ESTD_OVERALLOC_COUNT drops to 0. This indicates that no work areas require multipass execution. * At TARGET_MB = 900 MB and above: * The CACHE_HIT_PERC increases slightly to 82%-84%. * The ESTD_OVERALLOC_COUNT remains 0, meaning that all work areas are now either optimal or one-pass. Why D is Correct: * At 800 MB or more, the ESTD_OVERALLOC_COUNT is 0, indicating that all one-pass execution work areas are eliminated. * A one-pass execution requires temporary disk I/O for intermediate results, but with sufficient PGA, these are no longer necessary. Why Other Options Are Incorrect: * Option A: * It mentions all multipass executions work areas would be eliminated at 700 MB. This is incorrect because, at 700 MB, the ESTD_OVERALLOC_COUNT is still 30, indicating some multipass work areas still exist. * Option B: * Suggests setting the PGA_AGGREGATE_TARGET to at least 800 MB, which is partially correct but does not address the elimination of one-pass execution. * Option C: * Suggests setting the PGA_AGGREGATE_TARGET to at least 700 MB, which is not sufficient to eliminate all one-pass executions, as shown by the ESTD_OVERALLOC_COUNT of 30.
1z1-084 Exam Question 9
You want to reduce the amount of db file scattered read that is generated in the database.You execute the SQL Tuning Advisor against the relevant workload. Which two can be part of the expected result?
Correct Answer: B,C
The SQL Tuning Advisor provides recommendations for improving SQL query performance. This may include suggestions for creating additional indexes to speed up data retrieval and materialized views to precompute and store query results.References: * Oracle Database SQL Tuning Guide, 19c
1z1-084 Exam Question 10
Which two options are part of a Soft Parse operation?
Correct Answer: E
During a soft parse, Oracle checks the shared SQL area to see if an incoming SQL statement matches one already in the shared pool. This operation includes syntax and semantic checks. The syntax check ensures the statement is properly formed, and the semantic check confirms that all the objects referenced in the SQL statement exist and that the user has the necessary privileges to access them.References: * Oracle Database Concepts, 19c * Oracle Database SQL Tuning Guide, 19c