SQL Access Advisor
SQL Tuning Advisor (STA)
SQL Performance Analyzer (SPA)
Automatic Workload Repository (AWR) compare period report
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.
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
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 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.
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
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
2 and 3 only
6 and 7 only
1, 4, and 5 only
2, 3, and 5 only
2, 3, 4, and 5 only
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.
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
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.
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
Database Replay
SQL Tuning Advisor
SQL Access Advisor
SQL Performance Analyzer
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.
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.
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.
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
This ratio is reasonable. However, decrease the shared pool size for better performance.
This ratio is very high and the shared pool size should be increased immediately to reduce this ratio.
This ratio is reasonable. However, this needs monitoring. Increase the shared pool size only if the ratio crosses 1.
This ratio is reasonable. However, this needs monitoring. Increase the shared pool size only if the ratio falls below 0.1.
Increasing the size of the shared pool
Setting the CURSOR_SHARING parameter to EXACT
Decreasing the value set for the OPEN_CURSORS parameter
Replacing literals with bind variables in SQL statements with the PLAN_HASH_VALUE 1337874392
Replacing literals with bind variables in SQL statements with the PLAN_HASH_VALUE 1445457117
Increasing the size of the shared pool
Adding one more CPU to the system
Setting the CURSOR_SHARING parameter to EXACT
Configuring Java pool because it is not configured
Because the plan was bind aware
Because the bind peeking never happened
Because the OPEN_CURSORS parameter is set to a very low value
Because the optimizer did not consider selectivity due to the use of bind variables
The reserved pool is very large. Consider reducing the size of the shared pool.
The reserved pool is large and has free space to satisfy requests. Consider reducing the size of the reserved pool
The reserved pool is very small and is not finding enough memory to satisfy requests. Increase the size of the shared pool.
The reserved pool is very small and is not finding enough memory to satisfy requests. Increase the size of the reserved pool.
Enable the result cache if not already enabled.
Flush the shared pool to make space for this procedure.
Keep the UPDATE_INV procedure by using the DBMS_SHARED_POOL.KEEP procedure.
Increase the size of the keep buffer pool to accommodate the UPDATE_INV procedure.
Ask the developers to modify and use literals instead of bind variables in the UPDATE_INV procedure.
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.
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.
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.
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
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
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
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
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
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
1) The Exhibit DBTIME shows that the DB CPU event consumed very high % DB Time. 2) The CPU is very slow. 3) Increase the number of processors
1) hard parse elapsed time has the majority time in parse time elapsed, which is shown in the TIMEMODEL Exhibit. 2) This is due to inadequate Database Buffer Cache. 3) Increase the size of database buffer cache.
1) sql execute elapsed time and parse time elapsed are consuming very high % DB Time in the TIMEMODEL Exhibit. 2) There are too many soft parses. 3) Investigate the HOLD_CURSOR parameter setting in the application and set it appropriately.
1) % Non-Parse CPU is low and Soft Parse % is also low in the EFFICIENCY Exhibit. This shows that very few statements are found in the cache. 2) There are too many hard parses. 3) Investigate the CURSOR_SHARING parameter setting and set it appropriately.
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.
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
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.
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.
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.
Recommendation for SQL profiles
Recommendation about effective indexing
Recommendation about stale or no statistics
Recommendation about the structure of SQL statements
Each row in the output represents a SQL statement that had to wait for mutexes.
The Cursor Stat and Cursor Pin SLEEPS indicate that the CURSOR_SHARING parameter is set to EXACT
The GETS column shows the number of times a mutex/location was requested by the requesting session while being held by the blocking session
The sum of numbers in the GETS and SLEEPS columns indicates the number of times a mutex/location was requested by the requesting session while being held by the blocking session
Running SQL Access Advisor
Adding them to SQL Plan Baseline
Submitting them to SQL Tuning Advisor
Running Automatic Database Diagnostic Monitor (ADDM)
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.
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.
Quiz Review Timeline (Updated): Mar 20, 2022 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Test Your Coding Interest Levels
Take the online quiz and discover your interest levels in the coding field. Each question embedded with a list of interest requires you to pick one ultimately will guide you to...
Questions:
10 |
Attempts:
502 |
Last updated:
Mar 21, 2022
|
Programming For Problem Solving
This quiz titled 'Programming for Problem Solving' assesses knowledge in C programming, focusing on understanding functions, recursion, and program structure. It is designed for...
Questions:
30 |
Attempts:
832 |
Last updated:
Mar 22, 2023
|
PPS Class Test 2_1
This test evaluates understanding of basic programming concepts including structures, function prototypes, recursion, and array operations in a programming context.
Questions:
10 |
Attempts:
140 |
Last updated:
Mar 21, 2023
|
True/False Exercise - NumPy
This True\/False quiz tests knowledge on NumPy, focusing on ndarray characteristics, array operations, and data manipulation techniques.
Questions:
10 |
Attempts:
446 |
Last updated:
Mar 21, 2023
|
Midterm - Quiz 3
Midterm Quiz 3 explores multicore programming, thread management, and multithreading models, focusing on practical approaches and challenges in concurrent programming.
Questions:
13 |
Attempts:
119 |
Last updated:
Mar 15, 2023
|
Wanna Be A Programmer? The Coding Trivia!
Computer programming consists of designing and building an executable computer program for completing a well-defined computing task. It is very popular nowadays, where a lot...
Questions:
10 |
Attempts:
442 |
Last updated:
Mar 21, 2023
|
Wait!
Here's an interesting quiz for you.