Running SQL Access Advisor
Adding them to SQL Plan Baseline
Submitting them to SQL Tuning Advisor
Running Automatic Database Diagnostic Monitor (ADDM)
The second plan, because it is a fixed plan
The first plan, because it is an accepted plan
The second plan, because it is the latest generated plan in FIRST_ROW mode
A new plan, because the second plan in FIRST_ROW mode is not an accepted plan
Java pool is not configured
The CPU in the system is slow
The shared pool size is inadequate
The database buffer cache is inadequate
The OPEN_CURSORS parameter is set to a small value
Decrease the value of the DBWR_IO_SLAVES parameter.
Set the USE_INDIRECT_DATA_BUFFERS parameter to TRUE.
Increase the value of the DB_WRITER_PROCESSES parameter.
Increase the value of the DB_FILE_MULTIBLOCK_READ_COUNT parameter
Set the SGA_TARGET parameter to 300M
Set the SGA_MAX_SIZE parameter to 400M
Set the MEMORY_TARGET parameter to 100M
Set the MEMORY_MAX_TARGET parameter to 300M
Because it can be used during peak hours
Because it avoids unnecessary cursor invalidation
Because it adjusts the high-water mark (HWM) immediately
Because you have long-running queries that might span the shrink operation
Because it does not allow any data manipulation language (DML) operations, thereby making the shrink operation faster
DB time includes the wait time of all the nonidle and idle user sessions.
SQL execute elapsed time includes the time spent in performing fetches of query results.
DB CPU includes the CPU time spent on database user-level calls and background CPU time.
SQL execute elapsed time includes components of the hard parse elapsed time like bind elapsed time.
DB time includes the connection management call elapsed time excluding the background process time.
It is refreshed automatically based on the moving window baseline
It compares details between any two selected time periods of the same duration.
It normalizes the statistics by the amount of time spent on the database for each time period.
It compares details between two consecutive time periods of the same or different durations and is refreshed every 60 minutes.
Increasing the flashback retention period
Increasing the retention period for SQL Management Base
Increasing the undo retention period for the database instance
Increasing the Automatic Workload Repository (AWR) retention period
A part of SGA memory is used to store ASH data as rolling buffer.
The ASH data can be analyzed between any two small time intervals.
All ASH data in memory are flushed to disk by MMON in every 3 seconds.
All ASH data in memory are flushed to disk by MMNL process whenever the buffer is full.
Statement level OPTIMIZER_MODE hints take precedence over the session-level setting.
The OPTIMIZER_MODE parameter set at instance level takes precedence over the session-level value.
The optimizer uses a cost-based approach, regardless of the presence of statistics; it optimizes with a goal of best response time.
The optimizer uses a cost-based approach for all SQL statements in the session, regardless of the presence of statistics; it optimizes with a goal of best throughput.
Setting the OPTIMIZER_MODE parameter to ALL_ROWS at the instance level
Setting the OPTIMIZER_MODE parameter to FIRST_ROWS_n at the instance level
Asking the developer to add a hint /*ALL_ROWS*/ in the long-running batch processing queries
Asking the developer to add a hint /*FIRST_ROWS_n*/ in the long-running batch processing queries
Parsing of a SQL statement
Operating system (OS) statistics
Object statistics in the data dictionary
The OPTIMIZER_MODE initialization parameter
Optimizer SQL hints for changing the query optimizer goal
The OPTIMIZER_INDEX_COST_ADJ initialization parameter has a low value.
The DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter has a low value.
The statistics for the table and all the indexes associated with the table are not current.
The table has less than DB_FILE_MULTIBLOCK_READ_COUNT blocks under the high-water mark.
The OPTIMIZER_INDEX_COST_ADJ initialization parameter is set to a low value.
The OPTIMIZER_INDEX_COST_ADJ initialization parameter is set to a high value.
The DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a low value.
The statistics for the table and all the indexes associated with the table are not current.
Creating function-based indexes by concatenating all the columns
Updating histogram statistics for these columns by using the DBMS_STATS.GATHER_TABLE_STATS procedure
Using the DBMS_STATS.CREATE_EXTENDED_STATS function to create a virtual column and create index on the virtual column
Using the DBMS_STATS.CREATE_EXTENDED_STATS function to create a virtual column and the DBMS_STATS.GATHER_TABLE_STATS procedure to collect statistics on the virtual column
Set the STATISTICS_LEVEL parameter to ALL.
Set the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE.
Create extended statistics for the CUST_STATE_PROVINCE and COUNTRY_ID columns.
Increase the STALE_PERCENT value for the CUSTOMERS table by using the DBMS_STATS. SET_TABLE_PREFS procedure.
Setting the STATISTICS_LEVEL parameter to ALL
Setting the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE
Creating extended statistics for the CUST_LAST_NAME, CUST_ID, and CUST_TOTAL columns
Updating the statistics for the CUSTOMERS table by using the DBMS_STATS.GATHER_TABLE_STATS procedure
Because the histogram statistics for the COUNTRY_ID column are not updated
Because the index statistics for the index on the COUNTRY_ID column are not current
Because the DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a higher value
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.
Because the histogram statistics for the COUNTRY_ID column are not updated
Because the DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter is set to a high value
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
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.
Reorganizing the table to use fewer blocks
Rebuilding the index on the CUST_FIRST_NAME column
Increasing the value for the PCTFREE attribute for the CUST table
Increasing the value for the PGA_AGGREGATE_TARGET initialization parameter
SQL Access Advisor
SQL Tuning Advisor (STA)
SQL Performance Analyzer (SPA)
Automatic Workload Repository (AWR) compare period report
It detects changes in SQL execution plans.
It shows only the overall impact on workload.
It produces results that can be used to create the SQL plan baseline.
It generates recommendations to run SQL Tuning Advisor to tune regressed SQL statements.
The importance of SQL statements to be analyzed is based on the size of the objects accessed.
Database Replay
SQL Tuning Advisor
SQL Access Advisor
SQL Performance Analyzer
The EXPLAIN PLAN method
The TEST EXECUTE method
The COMPARE PERFORMANCE method
The OPTIMIZER_USE_SQL_PLAN_BASELINE parameter set to TRUE
It generates execution plans and execution statistics.
It executes only the query part of the DML statements.
The test plans are generated and added to plan baseline.
The test plans are executed, but not generated if they are available in the plan baseline.
Set the PUBLISH preference to FALSE for the table.
Set the NO_VALIDATE preference to TRUE for the table.
Set the OPTIMIZER_DYNAMIC_SAMPLING parameter to 0.
Set the OPTIMIZER_USE_SQL_PLAN_BASELINES parameter to FALSE for the session.
Set the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE for the session.
Set the OPTIMIZER_USE_PENDING parameter statistics to TRUE.
Increase the value of the STALE_PERCENT preference for these tables.
Mark those associated indexes that are less frequently used as invisible.
Increase the value of the ESTIMATE_PERCENT preference for these tables
Change the STALE_PERCENT preference to zero for the tables.
Set the OPTIMIZER_USE_PENDING parameter statistics to TRUE.
Set the OPTIMIZER_DYNAMIC_SAMPLING parameter to zero during day time.
Gather statistics on the table when the tables have a representative number of rows, and then lock the statistics.
Restoring statistics from statistics history up to the desired time
Deleting all AWR snapshots collected after the time of desired statistics collection
Applying the flashback table technique until the time of desired statistics collection
Setting the OPTIMIZER_PENDING_STATISTICS parameter to TRUE to use the previous version of statistics
The AWR retention time was set to zero.
The STATISTICS_LEVEL parameter was set to BASIC.
Some of the statistics were collected using the ANALYZE command.
There were user-defined statistics that were set by using the DBMS_STATS.SET_TABLE_STATS procedure.
Set the PUBLISH preference to TRUE for the partition table.
Set the NO_VALIDATE preference to TRUE for the partition table.
Set the INCREMENTAL preference to TRUE for the partition table.
Increase the value of the STALE_PERCENT preference for the partition table.
It is a set of recommendations by the optimizer to create new indexes.
It is auxiliary information collected by the optimizer for a SQL statement to eliminate estimation error.
It is a set of recommendations by the optimizer to refresh stale statistics to avoid bad execution plan.
It is a set of recommendations by the optimizer to restructure a SQL statement to avoid bad execution plan
The CONTROL_MANAGEMENT_PACK_ACCESS parameter is not set to DEV2.
The OPTIMIZER_MODE parameter is set to ALL_ROWS for the user session.
The SQLTUNE_CATEGORY parameter is set to DEFAULT for the user session.
The OPTIMIZER_USE_PLAN_BASELINES parameter is set to TRUE for the user session.
Alter the SQL profile to change the category of the SQL profile.
Set the OPTIMIZER_USE_PENDING_STATISTICS to TRUE the desired sessions.
Use database resource manager to prevent the use of the SQL profile by these user sessions.
Use database resource manager to preUse the resource management feature in profiles of these users to prevent the use of the SQL profile.
Set the OPTIMIZER_MODE parameter to ALL_ROWS for the database instance.
Set the SQLTUNE_CATEGORY parameter to DEFAULT for the database instance.
Set the OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES parameter to TRUE for the database instance.
Use the DBMS_SQLTUNE.SET_TUNING_TASK_PARAMETERS procedure to set ACCEPT_SQL_PROFILES to TRUE.
It becomes outdated immediately after the tables change.
It is maintained automatically along with the changes in the tables.
The profile will be used for the changed plans of the SQL statement.
The plan for the SQL statement is frozen until it is regenerated by the SQL Tuning Advisor.
Recommendation for SQL profiles
Recommendation about effective indexing
Recommendation about stale or no statistics
Recommendation about the structure of SQL statements
Because the second plan is not verified
Because the second plan is not part of the SQL plan baseline
Because the SQLTUNE_CATEGORY parameter is set to DEFAULT
Because the explain plan option in the user session does not allow the new plan because SQLTUNE_CATEGORY parameter is set to DEFAULT
Mark the second plan (in blue) as fixed.
Use SQL Tuning Advisor to tune the plan.
Use SQL Access Advisor to tune the plan.
Use the DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE function to evolve the plan.
Cursor cache
Stored outline
SQL Tuning Set
Automatic Workload Repository (AWR) snapshots
Include the old plans in the SQL plan baseline.
Use DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE to evolve plans.
Set the OPTIMIZER_USE_PENDING_STATISTICS parameter to TRUE.
Increase the value for the OPTIMIZER_DYNAMIC_SAMPLING parameter.
Increasing the AWR retention period
Purging the older SQL management objects
Increasing the size of the SYSTEM tablespace
Increasing the size of the SYSAUX tablespace
2 and 3 only
6 and 7 only
1, 4, and 5 only
2, 3, and 5 only
2, 3, 4, and 5 only
Flashback query
Distributed transactions
Logging in and logging out of sessions
All DDL statements having bind variables
Direct path load of data from external files
Gathering all the SQL statements and using SQL Tuning Advisor on the test database for performance analysis
Capturing the workload on the production database, replaying it on the test machine, and comparing the performance
Creating a SQL Tuning Set by capturing the SQL workload on the production database and using SQL Performance Analyzer for performance analysis
Configuring AWR to capture the maximum number of SQL statements, transporting it to the test system, and using SQL Access Advisor for performance analysis
Preprocess the captured workload for the specified target database version.
Set up as many replay clients as there are actual clients to the production system.
Set up all the replay clients on the same machine on which the test database is running.
Resolve all external references such as database links, external tables, and directory objects.
Restore the replay database to match the capture database at the start of the workload capture.
SYNCHRONIZATION = FALSE, THINK_TIME_SCALE = 0, CONNECT_TIME_SCALE = 0 and THINK_TIME_AUTO_CORRECT = FALSE
SYNCHRONIZATION = TRUE, THINK_TIME_SCALE = 100, CONNECT_TIME_SCALE = 0 and THINK_TIME_AUTO_CORRECT = FALSE
SYNCHRONIZATION = FALSE, THINK_TIME_SCALE = 100, CONNECT_TIME_SCALE = 100 and THINK_TIME_AUTO_CORRECT = TRUE
SYNCHRONIZATION = TRUE, THINK_TIME_SCALE = 100, CONNECT_TIME_SCALE = 100 and THINK_TIME_AUTO_CORRECT = FALSE
The replay database should be in the RESTRICTED mode.
You need to start at least 21 replay clients on six CPUs to start the replay.
The replay directory must have all the replay files that have been preprocessed.
The user should be able to use the workload replay package and should have the DBA role.
The replay options for think_time_scale and connect_time_scale must be set to 100 each.
Reducing hard parses
Increasing the size of the shared pool
Using only dedicated server connections
Setting the CURSOR_SHARING parameter to EXACT
Encouraging the use of more literal SQL statements
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.