Which two actions can cause invalidation or loss of one or more results in the SQL Query Result Cache?
Correct Answer: A,B
The SQL Query Result Cache stores the results of queries and PL/SQL function calls for reuse. However, entries in the result cache can be invalidated or lost under certain conditions: A: Results can be aged out of the cache when the cache becomes full and new results need to be stored. This process ensures that the cache does not exceed its allocated memory and that it contains the most recently used entries. B: Setting theRESULT_CACHE_MAX_SIZEparameter to 0 will effectively disable the result cache and all cached results will be lost, as Oracle will no longer allocate any memory to the result cache. References: * Oracle Database Performance Tuning Guide, 19c
Question 7
Examine this statement and output: Which two situations can trigger this error?
Correct Answer: A,E
The ORA-15505 error indicates that the instance encountered errors while trying to access the specified directory. This could be due to: A: Insufficient privileges: The user attempting to start the workload capture might not have the required permissions to execute the DBMS_WORKLOAD_CAPTURE package or to read/write to the directory specified. E: Accessibility: The database instance may not be able to access the directory due to issues such as incorrect directory path, directory does not exist, permission issues at the OS level, or the directory being on a file system that's not accessible to the database instance. References: * Oracle Database Error Messages, 19c * Oracle Database Administrator's Guide, 19c
Question 8
A database instance is suffering poor I/O performance on two frequently accessed large tables. No Big Table caching occurs in the database. Examine these parameter settings: Which are two actions either one of which will allow Big Table caching to occur?
Correct Answer: C,D
Big Table caching is a feature that allows frequently accessed large tables to be cached in memory to improve I/O performance. From the parameter settings provided, Big Table caching is not occurring because DB_BIG_TABLE_CACHE_PERCENT_TARGETis set to 10, which is the minimum threshold for enabling the feature, but the size of the cache is too small for the big tables to be effectively cached. To enable Big Table caching, one of the following actions could be taken: * C (Correct):IncreasingDB_BIG_TABLE_CACHE_PERCENT_TARGETto at least 25. This action would allocate a larger percentage of the buffer cache for storing big tables, which could allow for caching large tables and thus improve I/O performance. * D (Correct):IncreasingDB_CACHE_SIZEto 1G. Since the size of the buffer cache is a determining factor for how much data can be cached, increasing this parameter would provide more memory space for big tables to be cached. Options A, B, E, and F will not enable Big Table caching because: * A:IncreasingDB_BIG_TABLE_CACHE_PERCENT_TARGETto 50 without adjusting the overall size of the cache might still not be sufficient if theDB_CACHE_SIZEis not large enough to hold the big tables. * B:SettingDB_KEEP_CACHE_SIZEto at least 50M only specifies a separate buffer pool for objects with the KEEP cache attribute and does not affect Big Table caching. * E:andF:Changing thePARALLEL_DEGREE_POLICYtoADAPTIVEorAUTOinfluences the behavior of parallel execution but does not directly enable or influence Big Table caching. References: * Oracle Database Performance Tuning Guide:Big Table Caching * Oracle Database Reference:DB_BIG_TABLE_CACHE_PERCENT_TARGET * Oracle Database Reference:DB_CACHE_SIZE
Question 9
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
Question 10
SGA_TARGET and PGA_AGGREGATE_TARGET are configured to nonzero values. MEMORY_target is then set to a nonzero value but memory_MAX_TARGET is not set. Which two statements are true?
Correct Answer: F,G
When MEMORY_TARGET is set to a nonzero value, Oracle automatically manages the memory allocation between the System Global Area (SGA) and the Program Global Area (PGA). If MEMORY_MAX_TARGET is not explicitly set, Oracle will behave in the following manner: * MEMORY_MAX_TARGET will default to the value of MEMORY_TARGET, assuming the platform allows for the value of MEMORY_TARGET to be increased dynamically. This means that MEMORY_TARGET represents both the initial allocation and the maximum limit for the dynamically managed memory unless MEMORY_MAX_TARGET is specified differently. * If MEMORY_TARGET is set to a value that is less than the sum of the current values of SGA_TARGET and PGA_AGGREGATE_TARGET, Oracle will use the higher sum as the default value for MEMORY_MAX_TARGET to ensure that there is adequate memory for both areas. The database instance will not start if MEMORY_TARGET is not sufficient to accommodate the combined SGA and PGA requirements. References * Oracle Database Administrator's Guide 19c: Automatic Memory Management * Oracle Database Performance Tuning Guide 19c: Using Automatic Memory Management