Performance Tuning Notes | resource manager | querys |
---|
9i Performance Tuning Guide and Reference
9i Performance Tuning Guide and Reference PDF
Notes from studying for the 9i Performance Tuning test. Information on this webpage came from one of the links provided
The system tablespace should only contain objects owned by the user sys |
You should have larger datafiles rather than alot of small datafiles because the headers of all the datafile need to be checkpointed everytime there is a check point. It's less work to checkpoint fewer larger datafiles than many smaller datafiles. |
checkpoint |
buffer busy waits
v$system_event
When a delete is performed, which type of undo is generated?
Oracle9i Database: Performance Tuning
Exam Topics
http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_exam_id=1Z0_033
Overview of Oracle9i Performance Tuning | |
[ ] | Describe the roles associated with the database tuning process |
[ ] | Describe the dependency between tuning in different development phases |
[ ] | Describe service level agreements |
[ ] | Describe appropriate tuning goals |
[ ] | Describe the most common tuning problems |
[ ] | Describe the tuning considerations during development and production |
[ ] | Describe performance and safety tradeoffs |
Make sure that there is no serialization or single threading going on within the application
Long-term, it is generally more valuable to increase the efficiency of your application in terms of the number of physical resources used for each business transaction.
designers must create a design that uses the same resources, regardless of user populations and data volumes, and does not put loads on the system resources beyond their limits
Sizing the Buffer Cache | |
[ ] | Describe how the buffer cache is used by different Oracle processes |
[ ] | Describe the tuning issues related to the buffer cache |
[ ] | Monitor the use of the buffer cache, also the different pools within the buffer cache |
[ ] | Implement dynamic SGA allocation |
[ ] | Set the DB_CACHE_ADVICE parameter |
[ ] | Create and size multiple buffer pools |
[ ] | Detect and resolve free list contention |
v$sysstat v$sess_io v$session SELECT 1 – ( physical.value / (blockgets.value+consistent.value)) “Buffer Cache Hit Ratio” |
Sizing other SGA Structures | |
[ ] | Monitor and size the redo log buffer |
[ ] | Monitor and size the java pool |
[ ] | Control the amount of Java session memory used by a session |
[ ] | Configure the instance to use I/O Slaves |
[ ] | Configure and use multiple DBW processors |
Monitoring and Detecting Lock Contention | |
[ ] | Define levels of locking |
[ ] | Describe possible causes of contention |
[ ] | Use Oracle utilities to detect lock contention |
[ ] | Resolve contention in an emergency |
[ ] | Prevent locking problems |
[ ] | Recognize Oracle errors arising from deadlocks |
Using Oracle Blocks Efficiently | |
[ ] | Describe the correct usage of extents and Oracle blocks |
[ ] | Explain space usage and the high water mark |
[ ] | Determine the high water mark |
[ ] | Recover space from sparsely populated segments |
[ ] | Describe and detect chaining and migration of Oracle blocks |
[ ] | Perform index reorganization |
[ ] | Monitor indexes to determine usage |
These are the standard index type, and they are excellent for primary key and highly-selective indexes. Used as concatenated indexes, B-tree indexes can be used to retrieve data sorted by the index columns.
These are suitable for low cardinality data. Through compression techniques, they can generate a large number of rowids with minimal I/O. Combining bitmap indexes on non-selective columns allows efficient AND and OR operations with a great number of rowids with minimal I/O. Bitmap indexes are particularly efficient in queries with COUNT(), because the query can be satisfied within the index.
These indexes allow access through a B-tree on a value derived from a function on the base data. Function-based indexes have some limitations with regards to the use of nulls, and they require that you have the cost-based optimizer enabled.
Function-based indexes are particularly useful when querying on composite columns to produce a derived result or to overcome limitations in the way data is stored in the database. An example of this is querying for line items in an order exceeding a certain value derived from (sales price - discount) x quantity, where these were columns in the table. Another example is to apply the UPPER function to the data to allow case-insensitive searches.
Partitioning a global index allows partition pruning to take place within an index access, which results in reduced I/Os. By definition of good range or list partitioning, fast index scans of the correct index partitions can result in very fast query times.
These are designed to eliminate index hot spots on insert applications. These indexes are excellent for insert performance, but they are limited in that they cannot be used for index range scans.
Diagnostic and Tuning Tools | |
[ ] | Explain how the alert.log file is used |
[ ] | Explain how background trace files are used |
[ ] | Explain how user trace files are used |
[ ] | Describe the statistics kept in the dynamic performance views |
[ ] | Explain how StatsPack collects statisticsd |
[ ] | Collect statistics using StatsPack |
[ ] | Collect statistics using Enterprise Manager |
[ ] | Use other tuning tools |
Database Configuration and I/O Issues | |
[ ] | Explain the advantages of distributing different Oracle file types |
[ ] | Describe reasons for partitioning data in tablespaces |
[ ] | Diagnose tablespace usage problems |
[ ] | Describe how checkpoints work |
[ ] | Monitor and tune checkpoints |
[ ] | Monitor and tune redo logs |
Optimize Sort Operations | |
[ ] | Describe how sorts are performed |
[ ] | Identify the SQL operations which require sorts |
[ ] | Differentiate between disk and memory sorts |
[ ] | Create and monitor temporary tablespaces |
[ ] | Reduce total sorts and disk sorts |
[ ] | Determine the number of sorts performed in memory |
[ ] | Set old and new sort parameters |
Default temporary tablespace for a databaase SELECT * FROM DATABASE_PROPERTIES select * from v$tempfile select * from dba_temp_files check free space in temp tablespace select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER; CREATE TEMPORARY TABLESPACE temp TEMPFILE '/oradata/mytemp_01.tmp' SIZE 20M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M; - must be a multiple of sort_area_sixe ALTER TABLESPACE temp ADD TEMPFILE '/oradata/temp03.dbf' SIZE 100M; CREATE USER scott DEFAULT TABLESPACE data TEMPORARY TABLESPACE temp; ALTER USER scott TEMPORARY TABLESPACE temp; |
v$session_wait - p1-file_id for the read call p2 - Start block_id for the read call p3 - Number of blocks in the read call - sorts don't fit into memory and go to disk. - Parallel slaves are used for scanning data - processing buffers faster than the I/O system v$tempseg_usage - to find the sql statement generating the sort v$sesstat - for session to determine the size of the sort workarea_size_policy - manual - increase the sort_area_size workarea_size_policy - auto - increase PGA_AGGREGATE_TARGET Check the following V$SESSION_WAIT parameter columns: |
Tuning Oracle Shared Server | |
[ ] | Identify issues associated with managing users in a Shared Server environment |
[ ] | Diagnose and resolve performance issues with Oracle Shared Server processes |
[ ] | Configure the Oracle Shared Server environment to optimize performance |
Application Tuning | |
[ ] | Describe the role of the DBA in tuning Applications |
[ ] | Explain different storage structures, and why one storage structure may be preferred over another |
[ ] | Explain the different types of indexes |
[ ] | Explain Index Organized Tables |
[ ] | Describe partitioning methods |
[ ] | Explain the use of the DBMS_STATS procedure |
[ ] | Describe Materialized Views and use of Query Rewrites |
[ ] | List requirements for OLTP, DSS and Hybrid Systems |
SQL Statement Tuning | |
[ ] | Describe how the Optimizer is used |
[ ] | Explain the concept of plan stability |
[ ] | Use stored outlines |
[ ] | Describe how hints are used |
[ ] | Use SQL Trace and TKPROF |
[ ] | Collect statistics on indexes and tables |
[ ] | Describe the use of histograms |
[ ] | Copy statistics between databases |
Sizing the Shared Pool | |
[ ] | Measure and tune the library cache hit ratio |
[ ] | Measure and tune the dictionary cache hit ratio |
[ ] | Size and pin objects in the shared pool |
[ ] | Tune the shared pool reserve space |
[ ] | Describe the UGA and session memory considerations |
[ ] | Explain other tuning issues related to the shared pool |
[ ] | Set the large pool |
Diagnosing Contention For Latches | |
[ ] | Describe the purpose of latches |
[ ] | Describe the different types of latch request |
[ ] | Diagnose contention for latches |
[ ] | Tune the appropriate resources to minimize latch contention |
Diagnosing Contention For Latches | |
[ ] | Describe the purpose of latches |
[ ] | Describe the different types of latch request |
[ ] | Diagnose contention for latches |
[ ] | Tune the appropriate resources to minimize latch contention |
Tuning the Operating System and Using Resource Manager | |
[ ] | Describe different system architectures |
[ ] | Describe the primary steps of OS tuning |
[ ] | Identify similarities between OS and DB tuning |
[ ] | Understand virtual memory and paging |
[ ] | Explain the difference between a process and a thread |
[ ] | Set up Database Resource Manager |
[ ] | Assign users to Resources Manager groups |
[ ] | Create resource plans within groups |
Hardware Components
The main hardware components are the following:
Software Components
Most applications involve the following components:
All you data entry punks, here's why your computers are so slow.
What is the user response time requirement?
Consideration of the user type is important. If the user is an executive who requires accurate information to make split second decisions, then user response time cannot be compromised. Other types of users, such as users performing data entry activities, might not need such a high level of performance.
http://education.oracle.com/pls/web_prod-plq-dad/show_desc.redirect?dc=D11299
Course:Objectives:
Course Topics:
Query V$LOCK to find the sessions holding the lock. If there are enqueue waits, you can see these using the following statement: |
ST enqueue If the contended-for enqueue is the ST enqueue, then the problem is most likely to be dynamic space allocation. - use locally managed tablespace - check to see if temporary tablespace uses temp files. if not switch to temp files - Change the next extent to sizes of the growing object to be large enough to avoid constance spacea llocation.- Alter - preallocate space in the segment - alter table allocate extent |