際際滷

際際滷Share a Scribd company logo
Enhancing SIEBEL Application
Performance  DB Perspective
- T.Mohan Reddy
息Company confidential 2
Context
Application Performance
息Company confidential 3
Types
 Major Types of Poor Performance
 Entire Application response is slow
 Specific Task or Processes perform poorly
 Certain views take a longtime to load
 Batch interface takes hours to execute
 Particular Tasks are Cumbersome
息Company confidential 4
Objective
 Key Factors Influencing Application Response
 Database Configuration Guidelines for Siebel CRM
 Detect and Diagnose
 Real Life Experiences
息Company confidential 5
Key Factors Influencing Performance
 Operating System Settings
 Network Topology and throughput
 Server Hardware Configuration
 Database Server Configuration settings
 Queries/Tasks from Other Applications
息Company confidential 6
Database Configuration Guidelines
 Setting right values to oracle DB Parameters
 Gathering Statistics
 SIEBEL OM Session Parameters
 Peeking User Binds
6
息Company confidential 7
DB Parameters
 More than 60 Oracle database parameters affect the generation of query
plans and execution of SQL statements
 OPTIMIZER_FEATURES_ENABLE
 It is always a good idea to set the this parameter to a value corresponding to the Oracle
Database patch version being used
 OPTIMIZER_INDEX_COST_ADJ
 It is Strongly recommended to set this parameter to 1 because in-house tuning of Siebel CRM
application was performed with OPTIMIZER_INDEX_COST_ADJ = 1 setting
 OPTIMIZER_DYNAMIC_SAMPLING
 It is recommended to set this parameter value to 1 and follow the instructions pertaining to
the collection of Optimizer statistics for Siebel CRM data tables
 STATISTICS_LEVEL
 It is recommended to set this value to TYPICAL level
7
息Company confidential 8
Gathering Statistics
 Deleting Optimizer Statistics
 Locking Optimizer Statistics
 Collecting Optimizer Statistics
 Frequency of Updating Statistics
 Recommended Script to Collect Optimizer Scripts
8
息Company confidential 9
SIEBEL Hard-Coded Session Parameters
 Beginning with Siebel 7.7 and 7.8 on Oracle Database 9i, the
Siebel database connector was modified to make a few ALTER
SESSION statements for OLTP operations
 The same functionality has been built into the Siebel database
connectors for Oracle 10g and 11g.
 Each Siebel Application Object Manager session automatically
sets the following session parameters
 ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_10
 ALTER SESSION SET HASH_JOIN_ENABLED = FALSE (_hash_join_enabled)
 ALTER SESSION SET _OPTIMIZER_SORTMERGE_JOIN_ENABLED = FALSE
 ALTER SESSION SET _OPTIMIZER_JOIN_SEL_SANITY_CHECK = TRUE
9
息Company confidential 10
Peeking of User Binds in Siebel
 Siebel Application Object Manager (AOM) generates SQL
statements with the syntax :n in the WHERE clause, for example
 select LAST_NAME from S_CONTACT where TIMEZONE_ID=:n;
 SIEBEL AOM substitutes the real values for the placeholder(s) to
seek a better query plan. This is called peeking of user binds or
simply bind peek
 SIEBEL relies on the operating system environment variable
SIEBEL_ORA_BIND_PEEK, The default value is Set to FALSE
10
息Company confidential 11
Detect & Diagnose
 Capture Long running SQLs Using Oracle EM
 Detection of columns requiring index
 Analyze Explain Plan
 Stored Outlines
 Governor Tool
11
息Company confidential 12
Long running SQLs
12
 Look for Long running SQLs (Including the other system queries
on SIEBEL DB)
息Company confidential 13
Columns requiring Index
13
 Using the Siebel Profiling SQL, detect the Columns requiring Index
息Company confidential 14
Example Query Plan
14
 Query which was running for almost 3 hrs
 The same tuned Query running in less than 10 Mins
息Company confidential 15
Stored Outlines
 A stored outline is a collection of hints associated with a specific SQL statement that allows a standard
execution plan to be maintained
 Collect the Long running SQLs (from shared pool)
 Create an outline on the original SQL
 Create an outline for the hinted SQL
 Update the OUTLN.OL$HINTS table to replace the outline of ORIGINAL SQL with the HINTED SQL
 Drop the Outline with the Hinted SQL
 When the same SQL is issued to the DB , now the DB is forced to use the Hinted SQL instead of the Original one
15
insert into SIEBEL.S_DOCK_INITM_1
(PR_TBL_ROW_ID, DOCK_NAME, NODE_ID,
VIS_STRENGTH)
select DISTINCT T1.SHIP_OU_ID PR_TBL_ROW_ID_T,
'PTY-O' DOCK_NAME_T,
di.NODE_ID NODE_ID_T, 50 VIS_STRENGTH_T
from SIEBEL.S_ORDER_ITEM T1,
SIEBEL.S_DOCK_INITM_1 di
where di.NODE_ID = :v1
and di.DOCK_NAME = 'Z40'
and di.PR_TBL_ROW_ID = T1.ORDER_ID
and di.VIS_STRENGTH >= 100
and T1.SHIP_OU_ID is not null
and T1.SHIP_OU_ID <> 'No Match Row Id'
and not exists
(select 'X'
from SIEBEL.S_DOCK_INITM_1 di2
where di2.NODE_ID = :v2
and di2.DOCK_NAME = 'PTY-O'
and di2.PR_TBL_ROW_ID = T1.SHIP_OU_ID)
insert into SIEBEL.S_DOCK_INITM_1
(PR_TBL_ROW_ID, DOCK_NAME, NODE_ID,
VIS_STRENGTH)
select /*+ PARALLEL ( T1 2) PARALLEL ( di 2) USE_HASH( di
t1) */ DISTINCT T1.SHIP_OU_ID PR_TBL_ROW_ID_T, 'PTY-O'
DOCK_NAME_T,
di.NODE_ID NODE_ID_T, 50 VIS_STRENGTH_T
from SIEBEL.S_ORDER_ITEM T1,
SIEBEL.S_DOCK_INITM_1 di
where di.NODE_ID = :v1
and di.DOCK_NAME = 'Z40'
and di.PR_TBL_ROW_ID = T1.ORDER_ID
and di.VIS_STRENGTH >= 100
and T1.SHIP_OU_ID is not null
and T1.SHIP_OU_ID <> 'No Match Row Id'
and not exists
(select 'X'
from SIEBEL.S_DOCK_INITM_1 di2
where di2.NODE_ID = :v2
and di2.DOCK_NAME = 'PTY-O'
and di2.PR_TBL_ROW_ID = T1.SHIP_OU_ID)
ORIGINAL SQL HINTED SQL
息Company confidential 16
Live Scenario 1
Scenario :
 Four Dedicated SIEBEL Remote Servers(Production) with very good
Configuration
 Total number Mobile Clients to Extract is 400
 Mobile Extracts were taking 3 days in every cycle
 Collected all the Long Running SQLs and Tuned During Mobile Extract
 Created Stored Outlines for the original and tuned (Hinted) SQLs
 Swapped the original and hinted outlines
 Started the Mobile Extracts
16
息Company confidential 17
Live Scenario 1 - Results
The entire operation now gets completed in
12 Hours
17
息Company confidential 18
Live Scenario 2
Scenario :
 Two Load balanced SIEBEL Servers(Production) with very good
Configuration
 Oracle Standard Gather Statistics Job (comes with Oracle 10g & 11g)
 Live with 50 routes out of 400 (One Distribution Center)
 Expanded one more Distribution Center
 HH Synchronization timings increased drastically and started failing, which
became a show stopper
 Implemented the Gather Statistics Job recommended by the Oracle
 Deleted the statistics and locked the tables which has rows less than or equal
to 15 rows
 Set the DB Parameters according to the reccomendations
18
息Company confidential 19
Live Scenario 2- Results
Each HH Synchronization completes in
10 to 12 Minutes
19
息Company confidential 20
Governor Tool
 Mandatory to have a Governor Tool/ Tasks
 Monitoring
 Services & Components
 Storage
 Long Running SQLs & ETL Jobs
 Alert the specific users for specific tasks
 Kill the Long Running SQLs before it affects the other users
息Company confidential 21
Governor Tool
 Web Based Governor Tool
息Company confidential 22
Governor Tool  Sample Alert
息Company confidential 23
Thank you

More Related Content

What's hot (20)

Monitoring Microsoft SQL Server 2008 with Opsview
Monitoring Microsoft SQL Server 2008 with OpsviewMonitoring Microsoft SQL Server 2008 with Opsview
Monitoring Microsoft SQL Server 2008 with Opsview
Opsview
Give DevOps teams self-service resource pools within your private infrastruct...
Give DevOps teams self-service resource pools within your private infrastruct...Give DevOps teams self-service resource pools within your private infrastruct...
Give DevOps teams self-service resource pools within your private infrastruct...
Principled Technologies
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Marco Vigelini
10053 otw
10053 otw10053 otw
10053 otw
Doug Burns
301 Pdfsam
301 Pdfsam301 Pdfsam
301 Pdfsam
Emanuel Mateus
Xiotech Redefining Storage Value
Xiotech   Redefining Storage ValueXiotech   Redefining Storage Value
Xiotech Redefining Storage Value
hypknight
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Alex Zaballa
181 Rac
181 Rac181 Rac
181 Rac
Emanuel Mateus
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
Principled Technologies
VMware vCOPs Management Pack for Oracle Enterprise Manager
VMware vCOPs Management Pack for Oracle Enterprise ManagerVMware vCOPs Management Pack for Oracle Enterprise Manager
VMware vCOPs Management Pack for Oracle Enterprise Manager
Blue Medora
Concurrency problems and locking techniques in SQL Server 2000 and VB.NET
Concurrency problems and locking techniques in SQL Server 2000 and VB.NETConcurrency problems and locking techniques in SQL Server 2000 and VB.NET
Concurrency problems and locking techniques in SQL Server 2000 and VB.NET
Fernando G. Guerrero
oracle-rest-data-service-instal-config
oracle-rest-data-service-instal-configoracle-rest-data-service-instal-config
oracle-rest-data-service-instal-config
hunghtc83
Keep data available without affecting user response time
Keep data available without affecting user response timeKeep data available without affecting user response time
Keep data available without affecting user response time
Principled Technologies
resource governor
resource governorresource governor
resource governor
Aaron Shilo
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
Principled Technologies
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+server
hunghtc83
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Alfredo Krieg
81 Pdfsam
81 Pdfsam81 Pdfsam
81 Pdfsam
Emanuel Mateus
Oracle Data Redaction - EOUC
Oracle Data Redaction - EOUCOracle Data Redaction - EOUC
Oracle Data Redaction - EOUC
Alex Zaballa
Implementing the Change Detector Transformer to Process Data in a Software De...
Implementing the Change Detector Transformer to Process Data in a Software De...Implementing the Change Detector Transformer to Process Data in a Software De...
Implementing the Change Detector Transformer to Process Data in a Software De...
Safe Software
Monitoring Microsoft SQL Server 2008 with Opsview
Monitoring Microsoft SQL Server 2008 with OpsviewMonitoring Microsoft SQL Server 2008 with Opsview
Monitoring Microsoft SQL Server 2008 with Opsview
Opsview
Give DevOps teams self-service resource pools within your private infrastruct...
Give DevOps teams self-service resource pools within your private infrastruct...Give DevOps teams self-service resource pools within your private infrastruct...
Give DevOps teams self-service resource pools within your private infrastruct...
Principled Technologies
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Oracle Enterprise Manager Cloud Control 12c: how to solve 'ERROR: NMO Not Set...
Marco Vigelini
Xiotech Redefining Storage Value
Xiotech   Redefining Storage ValueXiotech   Redefining Storage Value
Xiotech Redefining Storage Value
hypknight
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Alex Zaballa
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
Principled Technologies
VMware vCOPs Management Pack for Oracle Enterprise Manager
VMware vCOPs Management Pack for Oracle Enterprise ManagerVMware vCOPs Management Pack for Oracle Enterprise Manager
VMware vCOPs Management Pack for Oracle Enterprise Manager
Blue Medora
Concurrency problems and locking techniques in SQL Server 2000 and VB.NET
Concurrency problems and locking techniques in SQL Server 2000 and VB.NETConcurrency problems and locking techniques in SQL Server 2000 and VB.NET
Concurrency problems and locking techniques in SQL Server 2000 and VB.NET
Fernando G. Guerrero
oracle-rest-data-service-instal-config
oracle-rest-data-service-instal-configoracle-rest-data-service-instal-config
oracle-rest-data-service-instal-config
hunghtc83
Keep data available without affecting user response time
Keep data available without affecting user response timeKeep data available without affecting user response time
Keep data available without affecting user response time
Principled Technologies
resource governor
resource governorresource governor
resource governor
Aaron Shilo
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
Principled Technologies
configuring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+serverconfiguring+oracle+rds+with+glasfish+server
configuring+oracle+rds+with+glasfish+server
hunghtc83
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13cClone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Clone Oracle Databases In Minutes Without Risk Using Enterprise Manager 13c
Alfredo Krieg
Oracle Data Redaction - EOUC
Oracle Data Redaction - EOUCOracle Data Redaction - EOUC
Oracle Data Redaction - EOUC
Alex Zaballa
Implementing the Change Detector Transformer to Process Data in a Software De...
Implementing the Change Detector Transformer to Process Data in a Software De...Implementing the Change Detector Transformer to Process Data in a Software De...
Implementing the Change Detector Transformer to Process Data in a Software De...
Safe Software

Similar to Application_Performance_V1 (20)

Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001
jucaab
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
Maris Elsins
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major GainsOptimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Datavail
War of the Indices- SQL Server and Oracle
War of the Indices-  SQL Server and OracleWar of the Indices-  SQL Server and Oracle
War of the Indices- SQL Server and Oracle
Kellyn Pot'Vin-Gorman
Emc sql server 2012 overview
Emc sql server 2012 overviewEmc sql server 2012 overview
Emc sql server 2012 overview
solarisyougood
2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...
2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...
2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...
J端rgen Ambrosi
Optimizer overviewoow2014
Optimizer overviewoow2014Optimizer overviewoow2014
Optimizer overviewoow2014
Mysql User Camp
Ms sql database consolidation
Ms sql database consolidationMs sql database consolidation
Ms sql database consolidation
simplelogic
Ms sql database consolidation
Ms sql database consolidationMs sql database consolidation
Ms sql database consolidation
simplelogic
Ms sql database consolidation
Ms sql database consolidationMs sql database consolidation
Ms sql database consolidation
simplelogic
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan InstabilityLVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
Maris Elsins
Beginners guide to_optimizer
Beginners guide to_optimizerBeginners guide to_optimizer
Beginners guide to_optimizer
Maria Colgan
Les11.ppt
Les11.pptLes11.ppt
Les11.ppt
AlhassanFederated
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
asifanw
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
ChristopherBow2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Vladimir Bacvanski, PhD
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical EfficiencyTaming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
Datavail
Sql views
Sql viewsSql views
Sql views
arshid045
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001Ebs dba con4696_pdf_4696_0001
Ebs dba con4696_pdf_4696_0001
jucaab
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 -  Using SQL Plan Baselines for Performance TestingOUG Harmony 2012 -  Using SQL Plan Baselines for Performance Testing
OUG Harmony 2012 - Using SQL Plan Baselines for Performance Testing
Maris Elsins
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major GainsOptimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Optimizing Oracle Databases & Applications Gives Fast Food Giant Major Gains
Datavail
War of the Indices- SQL Server and Oracle
War of the Indices-  SQL Server and OracleWar of the Indices-  SQL Server and Oracle
War of the Indices- SQL Server and Oracle
Kellyn Pot'Vin-Gorman
Emc sql server 2012 overview
Emc sql server 2012 overviewEmc sql server 2012 overview
Emc sql server 2012 overview
solarisyougood
2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...
2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...
2属 Ciclo Microsoft CRUI 3属 Sessione: l'evoluzione delle piattaforme tecnologi...
J端rgen Ambrosi
Optimizer overviewoow2014
Optimizer overviewoow2014Optimizer overviewoow2014
Optimizer overviewoow2014
Mysql User Camp
Ms sql database consolidation
Ms sql database consolidationMs sql database consolidation
Ms sql database consolidation
simplelogic
Ms sql database consolidation
Ms sql database consolidationMs sql database consolidation
Ms sql database consolidation
simplelogic
Ms sql database consolidation
Ms sql database consolidationMs sql database consolidation
Ms sql database consolidation
simplelogic
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan InstabilityLVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
Maris Elsins
Beginners guide to_optimizer
Beginners guide to_optimizerBeginners guide to_optimizer
Beginners guide to_optimizer
Maria Colgan
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
Con7091 sql tuning for expert db as-oow17_oct2_1507314871265001m0x4
asifanw
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
Designing Database Solutions for Microsoft SQL Server 2012 2012 Microsoft 70-...
ChristopherBow2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Vladimir Bacvanski, PhD
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical EfficiencyTaming the Beast: Optimizing Oracle EBS for Radical Efficiency
Taming the Beast: Optimizing Oracle EBS for Radical Efficiency
Datavail
Sql views
Sql viewsSql views
Sql views
arshid045
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis

Application_Performance_V1

  • 1. Enhancing SIEBEL Application Performance DB Perspective - T.Mohan Reddy
  • 3. 息Company confidential 3 Types Major Types of Poor Performance Entire Application response is slow Specific Task or Processes perform poorly Certain views take a longtime to load Batch interface takes hours to execute Particular Tasks are Cumbersome
  • 4. 息Company confidential 4 Objective Key Factors Influencing Application Response Database Configuration Guidelines for Siebel CRM Detect and Diagnose Real Life Experiences
  • 5. 息Company confidential 5 Key Factors Influencing Performance Operating System Settings Network Topology and throughput Server Hardware Configuration Database Server Configuration settings Queries/Tasks from Other Applications
  • 6. 息Company confidential 6 Database Configuration Guidelines Setting right values to oracle DB Parameters Gathering Statistics SIEBEL OM Session Parameters Peeking User Binds 6
  • 7. 息Company confidential 7 DB Parameters More than 60 Oracle database parameters affect the generation of query plans and execution of SQL statements OPTIMIZER_FEATURES_ENABLE It is always a good idea to set the this parameter to a value corresponding to the Oracle Database patch version being used OPTIMIZER_INDEX_COST_ADJ It is Strongly recommended to set this parameter to 1 because in-house tuning of Siebel CRM application was performed with OPTIMIZER_INDEX_COST_ADJ = 1 setting OPTIMIZER_DYNAMIC_SAMPLING It is recommended to set this parameter value to 1 and follow the instructions pertaining to the collection of Optimizer statistics for Siebel CRM data tables STATISTICS_LEVEL It is recommended to set this value to TYPICAL level 7
  • 8. 息Company confidential 8 Gathering Statistics Deleting Optimizer Statistics Locking Optimizer Statistics Collecting Optimizer Statistics Frequency of Updating Statistics Recommended Script to Collect Optimizer Scripts 8
  • 9. 息Company confidential 9 SIEBEL Hard-Coded Session Parameters Beginning with Siebel 7.7 and 7.8 on Oracle Database 9i, the Siebel database connector was modified to make a few ALTER SESSION statements for OLTP operations The same functionality has been built into the Siebel database connectors for Oracle 10g and 11g. Each Siebel Application Object Manager session automatically sets the following session parameters ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_10 ALTER SESSION SET HASH_JOIN_ENABLED = FALSE (_hash_join_enabled) ALTER SESSION SET _OPTIMIZER_SORTMERGE_JOIN_ENABLED = FALSE ALTER SESSION SET _OPTIMIZER_JOIN_SEL_SANITY_CHECK = TRUE 9
  • 10. 息Company confidential 10 Peeking of User Binds in Siebel Siebel Application Object Manager (AOM) generates SQL statements with the syntax :n in the WHERE clause, for example select LAST_NAME from S_CONTACT where TIMEZONE_ID=:n; SIEBEL AOM substitutes the real values for the placeholder(s) to seek a better query plan. This is called peeking of user binds or simply bind peek SIEBEL relies on the operating system environment variable SIEBEL_ORA_BIND_PEEK, The default value is Set to FALSE 10
  • 11. 息Company confidential 11 Detect & Diagnose Capture Long running SQLs Using Oracle EM Detection of columns requiring index Analyze Explain Plan Stored Outlines Governor Tool 11
  • 12. 息Company confidential 12 Long running SQLs 12 Look for Long running SQLs (Including the other system queries on SIEBEL DB)
  • 13. 息Company confidential 13 Columns requiring Index 13 Using the Siebel Profiling SQL, detect the Columns requiring Index
  • 14. 息Company confidential 14 Example Query Plan 14 Query which was running for almost 3 hrs The same tuned Query running in less than 10 Mins
  • 15. 息Company confidential 15 Stored Outlines A stored outline is a collection of hints associated with a specific SQL statement that allows a standard execution plan to be maintained Collect the Long running SQLs (from shared pool) Create an outline on the original SQL Create an outline for the hinted SQL Update the OUTLN.OL$HINTS table to replace the outline of ORIGINAL SQL with the HINTED SQL Drop the Outline with the Hinted SQL When the same SQL is issued to the DB , now the DB is forced to use the Hinted SQL instead of the Original one 15 insert into SIEBEL.S_DOCK_INITM_1 (PR_TBL_ROW_ID, DOCK_NAME, NODE_ID, VIS_STRENGTH) select DISTINCT T1.SHIP_OU_ID PR_TBL_ROW_ID_T, 'PTY-O' DOCK_NAME_T, di.NODE_ID NODE_ID_T, 50 VIS_STRENGTH_T from SIEBEL.S_ORDER_ITEM T1, SIEBEL.S_DOCK_INITM_1 di where di.NODE_ID = :v1 and di.DOCK_NAME = 'Z40' and di.PR_TBL_ROW_ID = T1.ORDER_ID and di.VIS_STRENGTH >= 100 and T1.SHIP_OU_ID is not null and T1.SHIP_OU_ID <> 'No Match Row Id' and not exists (select 'X' from SIEBEL.S_DOCK_INITM_1 di2 where di2.NODE_ID = :v2 and di2.DOCK_NAME = 'PTY-O' and di2.PR_TBL_ROW_ID = T1.SHIP_OU_ID) insert into SIEBEL.S_DOCK_INITM_1 (PR_TBL_ROW_ID, DOCK_NAME, NODE_ID, VIS_STRENGTH) select /*+ PARALLEL ( T1 2) PARALLEL ( di 2) USE_HASH( di t1) */ DISTINCT T1.SHIP_OU_ID PR_TBL_ROW_ID_T, 'PTY-O' DOCK_NAME_T, di.NODE_ID NODE_ID_T, 50 VIS_STRENGTH_T from SIEBEL.S_ORDER_ITEM T1, SIEBEL.S_DOCK_INITM_1 di where di.NODE_ID = :v1 and di.DOCK_NAME = 'Z40' and di.PR_TBL_ROW_ID = T1.ORDER_ID and di.VIS_STRENGTH >= 100 and T1.SHIP_OU_ID is not null and T1.SHIP_OU_ID <> 'No Match Row Id' and not exists (select 'X' from SIEBEL.S_DOCK_INITM_1 di2 where di2.NODE_ID = :v2 and di2.DOCK_NAME = 'PTY-O' and di2.PR_TBL_ROW_ID = T1.SHIP_OU_ID) ORIGINAL SQL HINTED SQL
  • 16. 息Company confidential 16 Live Scenario 1 Scenario : Four Dedicated SIEBEL Remote Servers(Production) with very good Configuration Total number Mobile Clients to Extract is 400 Mobile Extracts were taking 3 days in every cycle Collected all the Long Running SQLs and Tuned During Mobile Extract Created Stored Outlines for the original and tuned (Hinted) SQLs Swapped the original and hinted outlines Started the Mobile Extracts 16
  • 17. 息Company confidential 17 Live Scenario 1 - Results The entire operation now gets completed in 12 Hours 17
  • 18. 息Company confidential 18 Live Scenario 2 Scenario : Two Load balanced SIEBEL Servers(Production) with very good Configuration Oracle Standard Gather Statistics Job (comes with Oracle 10g & 11g) Live with 50 routes out of 400 (One Distribution Center) Expanded one more Distribution Center HH Synchronization timings increased drastically and started failing, which became a show stopper Implemented the Gather Statistics Job recommended by the Oracle Deleted the statistics and locked the tables which has rows less than or equal to 15 rows Set the DB Parameters according to the reccomendations 18
  • 19. 息Company confidential 19 Live Scenario 2- Results Each HH Synchronization completes in 10 to 12 Minutes 19
  • 20. 息Company confidential 20 Governor Tool Mandatory to have a Governor Tool/ Tasks Monitoring Services & Components Storage Long Running SQLs & ETL Jobs Alert the specific users for specific tasks Kill the Long Running SQLs before it affects the other users
  • 21. 息Company confidential 21 Governor Tool Web Based Governor Tool