SlideShare a Scribd company logo
7
Most read
8
Most read
16
Most read
Oracle Database Performance
Tuning
Presenter
Nitin Anjankar
Oracle
Databases
Performance
Agenda…
1. Finding the problem.
2. Approach towards resolution
3. Tool use for analysis
What Is Database Tuning?
The database tuning process consists of tasks such as:
 Balancing the different types of competing
resources in the database environment so that the
most important applications have priority access to
the resources they need to run.
 Identifying and eliminating resource bottlenecks.
 Optimizing the use of existing resources within the
database environment.
 Taking advantage of database features for the types
of work performed on the database.
What Are the Types of Performance
Tuning?
Tuning an Oracle database can involve tuning the application, the
instance, and the space usage in a database.
• Application/SQL Tuning –SQL Reuse Opportunities, Optimal
Data Access.
• Instance/Memory Tuning –Instance Parameter Optimizations.
• Space/Storage Management –Appropriate Space Management.
• OS Tuning –Tuning OS parameter like SWAP, Memory.
• Network Tuning –Network latency & loads.
Database Performance Analysis..
What data needs to be collect
1. Since when you are facing this slowness issue ?
2. Is the slowness persistent or does it varies based on the time of the day?
3. Is it happening with any specific user/s or across the globe ?
4. Is the complete application slow or issue with any specific module/operation/job ?
5. If it is with any specific module/operation/job then what queries are associated with this ? What actually it does ?
6. if its query specific, do we have the explain plan when it was working fine?
7. Is it newly added or old module/operation/job ?
8. What is its previous completion/response time ?
9. What is the current completion/response time ?
What data needs to be collect
10. Is there any changes happened at application/database/server level in recent past? If yes what kind of changes done ?
11. Is only one job/query slow or the entire database slow:
12. List of all tables used in your job:
13. Good Time (1 hour duration when the job was running fine):
14. Bad time (1 hour duration when the job was running the slowest):
15. After when has the issue started occurring, any particular date or database change or event ?
16. Will you be able to replicate the issue on the database at our will ?
17. Any select queries you can provide which are running slow ?
18. Have you connected with any other team. If yes, any findings from their side ?
Decentralize the issue..
Query Processing..
Oracle 10g+ uses something called the CBO (Cost-Based Optimizer) which determines the most efficient way to execute a
SQL statement after considering many factors related to the objects referenced and the conditions specified in the query.
This determination is an important step in the processing of any SQL statement and can greatly affect execution time.
A SQL statement can be executed in many different ways, including the following:
 Full table scans
 Index scans
 Nested loops
 Hash joins
The output from the optimizer is a plan that describes an optimum method of execution. The CBO formulates this plan
based on statistics. A combination of correct index-usage and decent statistics is key for well-performing queries.
Sometimes the CBO can make decisions that seem incorrect — this may be as a result of stale or inaccurate statistics.
Locating Slow Queries
Finding the guilty SQL is the first step in solving the issue. There are many approaches to this. Chances are if you
have a performance problem you already know the offending SQL.
The following are some simple ways of finding resource-intensive SQL.
1. Obtaining the Execution Plan
2. Enterprise Manager
3. AWR Views
4. ASH Reports
5. Real Time SQL Monitoring(SQL Trace)
Xplan for SQL
Plan hash value: 454993881
--------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 2 | 176 | 13 (16)| 00:00:01 |
| 1 | NESTED LOOPS | | 2 | 176 | 13 (16)| 00:00:01 |
|* 2 | HASH JOIN | | 1 | 65 | 11 (19)| 00:00:01 |
|* 3 | TABLE ACCESS FULL | PS_DEPT_TBL | 330 | 14850 | 6 (0)| 00:00:01 |
| 4 | VIEW | VW_SQ_1 | 660 | 13200 | 4 (25)| 00:00:01 |
| 5 | HASH GROUP BY | | 660 | 13860 | 4 (25)| 00:00:01 |
|* 6 | INDEX FAST FULL SCAN | PS1DEPT_TBL | 660 | 13860 | 3 (0)| 00:00:01 |
| 7 | TABLE ACCESS BY INDEX ROWID| PS_NAMES | 2 | 46 | 2 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | PS_NAMES | 2 | | 1 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("D"."EFFDT"="VW_COL_1" AND SYS_OP_DESCEND("D"."EFFDT")=SYS_OP_DESCEND(
"VW_COL_1") AND "SETID"="D"."SETID" AND "DEPTID"="D"."DEPTID")
3 - filter("D"."EFF_STATUS"='A')
6 - filter(SYS_OP_UNDESCEND(SYS_OP_DESCEND("EFFDT"))<=SYSDATE@! AND
SYS_OP_DESCEND("EFFDT")>=SYS_OP_DESCEND(SYSDATE@!))
8 - access("N"."EMPLID"="D"."MANAGER_ID")
Xplan comparision
SQL_ID bxu9sk3q91trn
--------------------
INSERT INTO TMP_ACTSEARCH1 (ACTIVITY_PK) SELECT ACT.ACTIVITY_PK FROM
TBL_TMX_ACTIVITY ACT WHERE CONTAINS(ACT.ACTIVITYDESC, :B1 ) > 0
Plan hash value: 2274164979
--------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------
| 0 | INSERT STATEMENT | | | | 379K(100)| |
| 1 | TABLE ACCESS FULL| TBL_TMX_ACTIVITY | 1 | 74 | 379K (8)| 00:00:30 |
--------------------------------------------------------------------------------------
SQL_ID bxu9sk3q91trn
--------------------
INSERT INTO TMP_ACTSEARCH1 (ACTIVITY_PK) SELECT ACT.ACTIVITY_PK FROM
TBL_TMX_ACTIVITY ACT WHERE CONTAINS(ACT.ACTIVITYDESC, :B1 ) > 0
Plan hash value: 4216380757
--------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
--------------------------------------------------------------------------------------
| 0 | INSERT STATEMENT | | | | 1 (100)|
| 1 | TABLE ACCESS BY INDEX ROWID| TBL_TMX_ACTIVITY | 1 | 73 | 0 (0)|
| 2 | DOMAIN INDEX | FT_TABLE_RAJLCU1R | | | 0 (0)|
--------------------------------------------------------------------------------------
Most possible/common causes..
There are many approaches to this finding issue and its possible solutions.
The following are some simple ways of possible causes.
1. Wait Events / Resource contention (Views: V$SESSION, V$LOCK, V$SQLTEXT, V$ACTIVE_SESSION_HISTORY,
V$SESSION_WAIT_HISTORY, GV$SESSION_WAIT)
2. Large number of long running scripts other than problematic one ( Views : V$SESSION, V$PROCESS)
3. Multiple Active & Inactive sessions counts. (Views : V$SESSION)
4. Old object(table/index/sys) statistics (Views : DBA_TAB_STATISTICS, DBA_IND_STATISTICS)
5. Incorrect optimization/execution plan(utility : dbms_xplan)
6. Fragmentation (Views : V$DBA_SEGMENTS, V$DBA_TABLES)
Most possible/common causes..
continue
8. Getting database I/O wrong (V$SQLAREA, V$SYSSTAT, PROCESS ,V$SESSION ,V$SESSTAT ,V$SESS_IO
,V$BGPROCESS)
9. Bad use of cursors and the shared pool (Parameter : CUSRSOR_SHARING , SGA, PGA)
10. High Amount of Recursive (SYS) SQL. (View : V$SYS_TIME_MODEL, V$SESS_TIME_MODEL)
11. Duplicate indexing / Full table scan (Views : V$OBJECT_USAGE, V$OBJECT_VIEW)
Recommended Database Parameters for
Oracle 10g and 11g
Some useful scripts..
Here are the links for all scripts mentioned in this document:
 Blocking/Waiting Sessions
 Detect long running scripts
 Index Usage
 Locks and inactive sessions
 Hit ratio and CPU usage
 Tablespace utilization
 Disk I/O
References
• http://www.oracle.com/technetwork/articles/schumacher-analysis-099313.html
• http://vsbabu.org/oracle/sect05.html
• http://www.dba-oracle.com/t_statistics_level_parameter.htm
• http://www.myoracletips.in/2013/02/what-is-pctfree-and-pctused-in-oracle.html
• http://rwijk.blogspot.com/2008/03/dbmsxplandisplaycursor.html

More Related Content

What's hot (20)

PDF
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 
PDF
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
PPTX
Explain the explain_plan
Maria Colgan
 
DOCX
Rac questions
parvezsigan
 
PDF
Performance tuning in sql server
Antonios Chatzipavlis
 
PPTX
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
SolarWinds
 
PPT
Oracle archi ppt
Hitesh Kumar Markam
 
PDF
Tanel Poder - Scripts and Tools short
Tanel Poder
 
PPTX
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Carlos Sierra
 
PPTX
Oracle RAC features on Exadata
Anil Nair
 
DOC
AWR reports-Measuring CPU
Mohammed Yasir Hashmi
 
PDF
Ash architecture and advanced usage rmoug2014
John Beresniewicz
 
PPT
Database performance tuning and query optimization
Dhani Ahmad
 
PDF
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
DOCX
Oracle architecture
Soumya Das
 
PPTX
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
PDF
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Sandesh Rao
 
PDF
SQLd360
Mauro Pagano
 
PDF
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 
PPT
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
oramanc
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Aaron Shilo
 
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
Explain the explain_plan
Maria Colgan
 
Rac questions
parvezsigan
 
Performance tuning in sql server
Antonios Chatzipavlis
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
SolarWinds
 
Oracle archi ppt
Hitesh Kumar Markam
 
Tanel Poder - Scripts and Tools short
Tanel Poder
 
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Carlos Sierra
 
Oracle RAC features on Exadata
Anil Nair
 
AWR reports-Measuring CPU
Mohammed Yasir Hashmi
 
Ash architecture and advanced usage rmoug2014
John Beresniewicz
 
Database performance tuning and query optimization
Dhani Ahmad
 
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
Oracle architecture
Soumya Das
 
All of the Performance Tuning Features in Oracle SQL Developer
Jeff Smith
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Sandesh Rao
 
SQLd360
Mauro Pagano
 
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
oramanc
 

Similar to Oracle Database Performance Tuning Basics (20)

PPT
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
udaymoogala
 
PDF
31063115_1679409488310Developer_Tuning_Tips_-_UTOUG_Mar_2023.pdf
TricantinoLopezPerez
 
PPTX
Advanced Database Administration 10g
Connor McDonald
 
PDF
O_Need-for-Speed_Top-Five-Oracle-Performance-Tuning-Tips_NYOUG.pdf
cookie1969
 
PDF
Findfixandvalidate 140221013443-phpapp01
Samy El Sherif, PMP, OUM.
 
PDF
Advanced tips for making Oracle databases faster
SolarWinds
 
PPTX
It Depends
Maggie Pint
 
PPTX
SQL Tuning 101
Carlos Sierra
 
PDF
sqltuning101-170419021007-2.pdf
TricantinoLopezPerez
 
PPT
Myth busters - performance tuning 102 2008
paulguerin
 
PPTX
Top 10 tips for Oracle performance
Guy Harrison
 
PPT
Top 10 Oracle SQL tuning tips
Nirav Shah
 
PDF
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
cookie1969
 
PDF
Step-by-Step Cookbook for Identifying and Tuning SQL Problems
Minh237839
 
PPT
Sql server performance tuning
ngupt28
 
PDF
An Approach to Sql tuning - Part 1
Navneet Upneja
 
PPTX
It Depends - Database admin for developers - Rev 20151205
Maggie Pint
 
PDF
Gems to help you troubleshoot query performance
Pedro Lopes
 
PDF
Top Ten Mistakes Found in Oracle Database Environments
Alireza Kamrani
 
PPTX
Oracle performance tuning_sfsf
Mao Geng
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
udaymoogala
 
31063115_1679409488310Developer_Tuning_Tips_-_UTOUG_Mar_2023.pdf
TricantinoLopezPerez
 
Advanced Database Administration 10g
Connor McDonald
 
O_Need-for-Speed_Top-Five-Oracle-Performance-Tuning-Tips_NYOUG.pdf
cookie1969
 
Findfixandvalidate 140221013443-phpapp01
Samy El Sherif, PMP, OUM.
 
Advanced tips for making Oracle databases faster
SolarWinds
 
It Depends
Maggie Pint
 
SQL Tuning 101
Carlos Sierra
 
sqltuning101-170419021007-2.pdf
TricantinoLopezPerez
 
Myth busters - performance tuning 102 2008
paulguerin
 
Top 10 tips for Oracle performance
Guy Harrison
 
Top 10 Oracle SQL tuning tips
Nirav Shah
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
cookie1969
 
Step-by-Step Cookbook for Identifying and Tuning SQL Problems
Minh237839
 
Sql server performance tuning
ngupt28
 
An Approach to Sql tuning - Part 1
Navneet Upneja
 
It Depends - Database admin for developers - Rev 20151205
Maggie Pint
 
Gems to help you troubleshoot query performance
Pedro Lopes
 
Top Ten Mistakes Found in Oracle Database Environments
Alireza Kamrani
 
Oracle performance tuning_sfsf
Mao Geng
 
Ad

Recently uploaded (20)

PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Letasoft Sound Booster 1.12.0.538 Crack Download+ Product Key [Latest]
HyperPc soft
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Perfecting XM Cloud for Multisite Setup.pptx
Ahmed Okour
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Tally software_Introduction_Presentation
AditiBansal54083
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Letasoft Sound Booster 1.12.0.538 Crack Download+ Product Key [Latest]
HyperPc soft
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Ad

Oracle Database Performance Tuning Basics

  • 3. Agenda… 1. Finding the problem. 2. Approach towards resolution 3. Tool use for analysis
  • 4. What Is Database Tuning? The database tuning process consists of tasks such as:  Balancing the different types of competing resources in the database environment so that the most important applications have priority access to the resources they need to run.  Identifying and eliminating resource bottlenecks.  Optimizing the use of existing resources within the database environment.  Taking advantage of database features for the types of work performed on the database.
  • 5. What Are the Types of Performance Tuning? Tuning an Oracle database can involve tuning the application, the instance, and the space usage in a database. • Application/SQL Tuning –SQL Reuse Opportunities, Optimal Data Access. • Instance/Memory Tuning –Instance Parameter Optimizations. • Space/Storage Management –Appropriate Space Management. • OS Tuning –Tuning OS parameter like SWAP, Memory. • Network Tuning –Network latency & loads.
  • 7. What data needs to be collect 1. Since when you are facing this slowness issue ? 2. Is the slowness persistent or does it varies based on the time of the day? 3. Is it happening with any specific user/s or across the globe ? 4. Is the complete application slow or issue with any specific module/operation/job ? 5. If it is with any specific module/operation/job then what queries are associated with this ? What actually it does ? 6. if its query specific, do we have the explain plan when it was working fine? 7. Is it newly added or old module/operation/job ? 8. What is its previous completion/response time ? 9. What is the current completion/response time ?
  • 8. What data needs to be collect 10. Is there any changes happened at application/database/server level in recent past? If yes what kind of changes done ? 11. Is only one job/query slow or the entire database slow: 12. List of all tables used in your job: 13. Good Time (1 hour duration when the job was running fine): 14. Bad time (1 hour duration when the job was running the slowest): 15. After when has the issue started occurring, any particular date or database change or event ? 16. Will you be able to replicate the issue on the database at our will ? 17. Any select queries you can provide which are running slow ? 18. Have you connected with any other team. If yes, any findings from their side ?
  • 10. Query Processing.. Oracle 10g+ uses something called the CBO (Cost-Based Optimizer) which determines the most efficient way to execute a SQL statement after considering many factors related to the objects referenced and the conditions specified in the query. This determination is an important step in the processing of any SQL statement and can greatly affect execution time. A SQL statement can be executed in many different ways, including the following:  Full table scans  Index scans  Nested loops  Hash joins The output from the optimizer is a plan that describes an optimum method of execution. The CBO formulates this plan based on statistics. A combination of correct index-usage and decent statistics is key for well-performing queries. Sometimes the CBO can make decisions that seem incorrect — this may be as a result of stale or inaccurate statistics.
  • 11. Locating Slow Queries Finding the guilty SQL is the first step in solving the issue. There are many approaches to this. Chances are if you have a performance problem you already know the offending SQL. The following are some simple ways of finding resource-intensive SQL. 1. Obtaining the Execution Plan 2. Enterprise Manager 3. AWR Views 4. ASH Reports 5. Real Time SQL Monitoring(SQL Trace)
  • 12. Xplan for SQL Plan hash value: 454993881 -------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 2 | 176 | 13 (16)| 00:00:01 | | 1 | NESTED LOOPS | | 2 | 176 | 13 (16)| 00:00:01 | |* 2 | HASH JOIN | | 1 | 65 | 11 (19)| 00:00:01 | |* 3 | TABLE ACCESS FULL | PS_DEPT_TBL | 330 | 14850 | 6 (0)| 00:00:01 | | 4 | VIEW | VW_SQ_1 | 660 | 13200 | 4 (25)| 00:00:01 | | 5 | HASH GROUP BY | | 660 | 13860 | 4 (25)| 00:00:01 | |* 6 | INDEX FAST FULL SCAN | PS1DEPT_TBL | 660 | 13860 | 3 (0)| 00:00:01 | | 7 | TABLE ACCESS BY INDEX ROWID| PS_NAMES | 2 | 46 | 2 (0)| 00:00:01 | |* 8 | INDEX RANGE SCAN | PS_NAMES | 2 | | 1 (0)| 00:00:01 | -------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("D"."EFFDT"="VW_COL_1" AND SYS_OP_DESCEND("D"."EFFDT")=SYS_OP_DESCEND( "VW_COL_1") AND "SETID"="D"."SETID" AND "DEPTID"="D"."DEPTID") 3 - filter("D"."EFF_STATUS"='A') 6 - filter(SYS_OP_UNDESCEND(SYS_OP_DESCEND("EFFDT"))<=SYSDATE@! AND SYS_OP_DESCEND("EFFDT")>=SYS_OP_DESCEND(SYSDATE@!)) 8 - access("N"."EMPLID"="D"."MANAGER_ID")
  • 13. Xplan comparision SQL_ID bxu9sk3q91trn -------------------- INSERT INTO TMP_ACTSEARCH1 (ACTIVITY_PK) SELECT ACT.ACTIVITY_PK FROM TBL_TMX_ACTIVITY ACT WHERE CONTAINS(ACT.ACTIVITYDESC, :B1 ) > 0 Plan hash value: 2274164979 -------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------------- | 0 | INSERT STATEMENT | | | | 379K(100)| | | 1 | TABLE ACCESS FULL| TBL_TMX_ACTIVITY | 1 | 74 | 379K (8)| 00:00:30 | -------------------------------------------------------------------------------------- SQL_ID bxu9sk3q91trn -------------------- INSERT INTO TMP_ACTSEARCH1 (ACTIVITY_PK) SELECT ACT.ACTIVITY_PK FROM TBL_TMX_ACTIVITY ACT WHERE CONTAINS(ACT.ACTIVITYDESC, :B1 ) > 0 Plan hash value: 4216380757 -------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| -------------------------------------------------------------------------------------- | 0 | INSERT STATEMENT | | | | 1 (100)| | 1 | TABLE ACCESS BY INDEX ROWID| TBL_TMX_ACTIVITY | 1 | 73 | 0 (0)| | 2 | DOMAIN INDEX | FT_TABLE_RAJLCU1R | | | 0 (0)| --------------------------------------------------------------------------------------
  • 14. Most possible/common causes.. There are many approaches to this finding issue and its possible solutions. The following are some simple ways of possible causes. 1. Wait Events / Resource contention (Views: V$SESSION, V$LOCK, V$SQLTEXT, V$ACTIVE_SESSION_HISTORY, V$SESSION_WAIT_HISTORY, GV$SESSION_WAIT) 2. Large number of long running scripts other than problematic one ( Views : V$SESSION, V$PROCESS) 3. Multiple Active & Inactive sessions counts. (Views : V$SESSION) 4. Old object(table/index/sys) statistics (Views : DBA_TAB_STATISTICS, DBA_IND_STATISTICS) 5. Incorrect optimization/execution plan(utility : dbms_xplan) 6. Fragmentation (Views : V$DBA_SEGMENTS, V$DBA_TABLES)
  • 15. Most possible/common causes.. continue 8. Getting database I/O wrong (V$SQLAREA, V$SYSSTAT, PROCESS ,V$SESSION ,V$SESSTAT ,V$SESS_IO ,V$BGPROCESS) 9. Bad use of cursors and the shared pool (Parameter : CUSRSOR_SHARING , SGA, PGA) 10. High Amount of Recursive (SYS) SQL. (View : V$SYS_TIME_MODEL, V$SESS_TIME_MODEL) 11. Duplicate indexing / Full table scan (Views : V$OBJECT_USAGE, V$OBJECT_VIEW)
  • 16. Recommended Database Parameters for Oracle 10g and 11g
  • 17. Some useful scripts.. Here are the links for all scripts mentioned in this document:  Blocking/Waiting Sessions  Detect long running scripts  Index Usage  Locks and inactive sessions  Hit ratio and CPU usage  Tablespace utilization  Disk I/O
  • 18. References • http://www.oracle.com/technetwork/articles/schumacher-analysis-099313.html • http://vsbabu.org/oracle/sect05.html • http://www.dba-oracle.com/t_statistics_level_parameter.htm • http://www.myoracletips.in/2013/02/what-is-pctfree-and-pctused-in-oracle.html • http://rwijk.blogspot.com/2008/03/dbmsxplandisplaycursor.html

Editor's Notes

  • #3: In Slide Show mode, click the arrow to enter the PowerPoint Getting Started Center.