Presentation on theme: "E-Business Suite and Oracle Database 10g Ahmed Alomari, Applications Performance Group Oracle Corporation."— Presentation transcript:
E-Business Suite and Oracle Database 10g Ahmed Alomari, Applications Performance Group Oracle Corporation
Agenda Certification Details 10g Features Manageability Optimizer PL/SQL Parallel Execution SQL and Library Cache Optimizations JDBC AWR DB Console Applications Performance Improvements Q &A
10g Certification with 11i 10gR1 Database ( ) Certified with 11i CU2 with Interoperability patch with Interoperability patch MetaLink Note (10gR1 Interoperability note for Oracle Applications 11i) 10gR2 Database ( ) Certified with 11i CU2 with 10gR2 Interop patch CU2 with 10gR2 Interop patch MetaLink Note (10gR2 Interoperability note for Oracle Applications 11i)
10g Features - Manageability Automatic Workload Repository (AWR) “Data Warehouse” of the Database Replacement for StatsPack Takes periodic snapshots Automatic Database Diagnostic Monitor (ADDM) Performance Diagnostic engine in the database Automatically diagnoses performance problems Provides Root Cause Analysis with recommended solutions Identifies non-problems areas Integrates all components
10g Features - Manageability Automatic SGA tuning Automatically sizes the individual SGA caches: Buffer cache Shared pool Java pool Uses Advisory information to dynamically size the caches. Just set sga_target= sga_target=10G
10g Features – Optimizer Enhancements RBO Rest in Peace!! CPU Costing Cost Based Transformations Sub-query un-nesting View merging Pushing of join predicates Cartesian Joins no longer considered when a connection exists. Hash based Aggregation HASH GROUP BY row source instead of SORT GROUP BY Runtime execution plans available via v$sql_plan. Bind variable values are captured via v$sql_bind_capture
10g Features – Optimizer Enhancements Plan table includes the following new columns: CPU_COST : estimated CPU cost IO_COST: estimated I/O cost TEMP_SPACE : estimated temporary space, in bytes, used by the operation; Network usage for query servers running on different nodes will be estimated Time: an estimate of how long each row source will take. Query Block Name (qblock_name) – can be used in conjunction with query block hint. dbms_xplan.display_cursor() can be used to show runtime plan of a cursor.
10g Features – Optimizer Enhancements New Format includes CPU cost, and time | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | | 0 | SELECT STATEMENT | | 1 | 74 | 7 (0)| 00:00:01 | | 1 | SORT AGGREGATE | | 1 | 74 | | | |* 2 | TABLE ACCESS BY INDEX ROWID | MTL_ITEM_CATEGORIES | 1 | 9 | 2 (0)| 00:00:01 | | 3 | NESTED LOOPS | | 1 | 74 | 7 (0)| 00:00:01 | | 4 | NESTED LOOPS | | 1 | 65 | 5 (0)| 00:00:01 | | 5 | MERGE JOIN CARTESIAN | | 1 | 42 | 4 (0)| 00:00:01 | |* 6 | TABLE ACCESS FULL | FINANCIALS_SYSTEM_PARAMS_ALL | 1 | 4 | 4 (0)| 00:00:01 | | 7 | BUFFER SORT | | 1 | 38 | 0 (0)| 00:00:01 | |* 8 | TABLE ACCESS BY INDEX ROWID| PO_APPROVED_SUPPLIER_LIST | 1 | 38 | 0 (0)| 00:00:01 | |* 9 | INDEX RANGE SCAN | PO_APPROVED_SUPPLIER_LIST_N1 | 1 | | 0 (0)| 00:00:01 | |* 10 | TABLE ACCESS BY INDEX ROWID | PO_ASL_STATUS_RULES | 1 | 23 | 1 (0)| 00:00:01 | |* 11 | INDEX RANGE SCAN | PO_ASL_STATUS_RULES_U1 | 4 | | 0 (0)| 00:00:01 | |* 12 | INDEX RANGE SCAN | MTL_ITEM_CATEGORIES_N3 | 3695 | | 2 (0)| 00:00:01 | Predicate Information (identified by operation id): filter("MIC"."INVENTORY_ITEM_ID"=TO_NUMBER(:ITEM_ID)) 6 - filter(NVL("ORG_ID",NVL(TO_NUMBER(DECODE(SUBSTRB(:B1,1,1),' ',NULL,SUBSTRB(:B2,1,10))),(-99)))=NVL(TO_NUMBER(DECODE(SUBSTRB(:B3,1,1),' ',NULL,SUBSTRB(:B4,1,10))),(-99))) 8 - filter("CATEGORY_ID" IS NOT NULL AND "VENDOR_SITE_ID"=TO_NUMBER(:VENDOR_SITE_ID) AND ("USING_ORGANIZATION_ID"=(-1) OR "USING_ORGANIZATION_ID"=DECODE(:TYPE_LOOKUP_CODE,'BLANKET',"USING_ORGANIZ ATION_ID",:SHIP_TO_ORGANIZATION_ID)) AND NVL("DISABLE_FLAG",'N')='N') 9 - access("ITEM_ID" IS NULL AND "VENDOR_ID"=TO_NUMBER(:VENDOR_ID)) filter("VENDOR_ID"=TO_NUMBER(:VENDOR_ID)) 10 - filter("ASR"."BUSINESS_RULE"='1_PO_APPROVAL') 11 - access("ASL_STATUS_ID"="ASR"."STATUS_ID") 12 - access("CATEGORY_ID"="MIC"."CATEGORY_ID")
10g Features – Optimizer Enhancements New Format includes CPU cost, time, and temp space (if used) | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | | 0 | SELECT STATEMENT | | 18M| 15G| | 1681K (7)| 05:36:16 | |* 1 | HASH JOIN | | 18M| 15G| 1434M| 1681K (7)| 05:36:16 | | 2 | TABLE ACCESS FULL| OE_ORDER_HEADERS_ALL | 3937K| 1389M| | (2)| 00:12:25 | |* 3 | TABLE ACCESS FULL| OE_ORDER_LINES_ALL | 18M| 9685M| | 1053K (10)| 03:30:41 | Predicate Information (identified by operation id): access("H"."HEADER_ID"="L"."HEADER_ID") 3 - filter("L"."CANCELLED_FLAG"='N')
10g Features – Optimizer Enhancements Workload Statistics Workload statistics allows the optimizer to learn the patterns of load and the duration of peak loads. Adaptive execution plans. The CBO might choose different execution plans based on the workload statistics.
10g Features – Optimizer Enhancements SQL Tune Optimizer spends more time by widening the search space and sampling in order to generate a more efficient plan. SQL Tune profiles are saved. Profiles can be created via the SQL Tuning Advisor via DB Console. Extremely useful for complex Applications SQL for which the default plan was not optimal. Immediate performance relief.
10g Features – PL/SQL Enhancements Every line of PL/SQL code runs 2X faster. Global Optimizer. Improved Native Compilation. Reduced collections memory footprint (15%).
10g Features – PL/SQL Enhancements Global Optimizer Eliminates temporary operands generated by the PL/SQL compiler. Such elimination causes less storage to be used and less time taken initializing temporary values. Computes certain operations during compilation rather that during execution. Reuses expression values. Converts single row fetches to bulk fetches.
10g Features – PL/SQL Enhancements Native Compilation Natively compiled PL/SQL code executes even faster than in earlier releases. The natively compiled units are stored in the database as BLOB data. Improves RAC Deployment You can switch between native and interpreted compilation for stored PL/SQL code for debugging purposes.
10g Features Rename a Tablespace. Online segment shrink. Automatic undo retention tuning. Semi-static VPD policies. Policy function is only invoked when context is reset. Partitioning List Partitioning enhancements Global hash partitioned indexes.
10g Features – SQL Optimization FAST DUAL Optimization 10g: SELECT SYSDATE FROM DUAL call count cpu elapsed disk query current rows Parse Execute Fetch total Rows Row Source Operation FAST DUAL (cr=0 pr=0 pw=0 time= us) 9iR2: SELECT SYSDATE FROM DUAL call count cpu elapsed disk query current rows Parse Execute Fetch total Rows Row Source Operation TABLE ACCESS FULL DUAL (cr=60000 pr=0 pw=0 time= us)
10g Features Library Cache Optimizations New efficient mutex is used to pin/unpin cursors Reduces library cache pin latch contention considerably Performance Improvement ranges from 10%-90% depending on the amount of time spent in library cache latch contention (due to pins). Init.ora parameter _kks_use_mutex_pin=TRUE enables this optimization Enabled by default in
10g Features Library Cache Optimizations Optimize “special” cursors COMMIT ROLLBACK SAVEPOINT ALTER SESSION Improves Applications performance 5-10%
10g Features - JDBC Improved connection cache Separates physical and logical connection layers. Improved performance (~10%) Bundled calls (single round trip per SQL call) as opposed to 2 or 3 round-trips: PARSE, EXECUTE, FETCH in 9i. Automatic type and precision detection upon execution.
SELECT u.user_name FROM fnd_user u where u.user_id=:1 call count cpu elapsed disk query current rows Parse Execute Fetch total Rows Row Source Operation TABLE ACCESS BY INDEX ROWID OBJ#(60344) (cr=3000 pr=0 pw=0 time=63796 us) 1000 INDEX UNIQUE SCAN OBJ#(60363) (cr=2000 pr=0 pw=0 time=36983 us)(object id 60363) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited Waited SQL*Net message to client SQL*Net message from client g Features - JDBC Round-trips in 9i JDBC
SELECT u.user_name FROM fnd_user u where u.user_id=:1 call count cpu elapsed disk query current rows Parse Execute Fetch total Rows Row Source Operation TABLE ACCESS BY INDEX ROWID OBJ#(60344) (cr=3000 pr=0 pw=0 time=67134 us) 1000 INDEX UNIQUE SCAN OBJ#(60363) (cr=2000 pr=0 pw=0 time=39483 us)(object id 60363) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited Waited SQL*Net message to client SQL*Net message from client g Features - JDBC Round Trips in 10g - Bundled Calls
10g Features - Manageability AWR Reports Includes Time Model Breakdown Total DB time Total time in SQL Total time in PL/SQL Total time in Parsing Diff Report of two periods Top SQL Section Reports Elapsed Time CPU Time Buffer Gets Physical Reads Executions Parse Calls Sharable Memory Version Count
10g Features - Manageability Improved detailed timing (of DB time) v$sys_time_model STAT_NAME VALUE DB CPU E+11 DB time E+11 Java execution elapsed time 0 PL/SQL compilation elapsed time PL/SQL execution elapsed time E+10 background cpu time E+10 background elapsed time E+12 connection management call elapsed time failed parse (out of shared memory) elapsed time 0 failed parse elapsed time hard parse (bind mismatch) elapsed time hard parse (sharing criteria) elapsed time hard parse elapsed time E+10 inbound PL/SQL rpc elapsed time 0 parse time elapsed E+10 sequence load elapsed time sql execute elapsed time E+11 SQL Exec PLSQL Exec Conn Mgmt Parse Java Exec
10g Features - Manageability Improved wait information Wait Statistics rolled-up by class. New Wait Classes Administrative Application Cluster Commit Concurrency Configuration Idle Network Other Scheduler System I/O User I/O
10g Features - Manageability Improved wait information Latch and enqueue names are included in the wait. EVENT TOTAL_WAITS TIME_WAITED enq: CF - contention enq: FU - contention enq: HW - contention 1 0 enq: PS - contention enq: TM - contention 4 1 enq: TX - contention 3 2 enq: US - contention latch: In memory undo latch 4 1 latch: cache buffers chains latch: cache buffers lru chain latch: enqueue hash chains 24 3 latch: library cache latch: library cache lock latch: library cache pin 21 3 latch: parallel query alloc buffer 30 2 latch: row cache objects latch: session allocation latch: shared pool
10g Features - Manageability SQL Identification New SQL_ID is used in place of SQL hash value to uniquely identify SQL statements Preserved across releases Allows SQL statement statistics to be easily compared across upgrades. SQL_ID HASH_VALUE SQL_TEXT tmsr3446uqn SELECT WIAS.ACTIVITY_STATUS, WIAS.ACTIVITY_RESULT_CODE, WIAS.ASSIGNED_USER, WIAS.NOTIFICATION_ID, WIAS.BEGIN_DATE, WIAS.END_DATE, WIAS.DUE_DATE, WIAS.ERROR_NAME, WIAS.ERROR_MESSAGE, WIAS.ERROR_STACK FROM WF_ITEM_ACTIVITY_STATUSES WIAS WHERE WIAS.ITEM_TYPE = :B3 AND WIAS.ITEM_KEY = :B2 AND WIAS.PROCESS_ACTIVITY = :B1
10g Features - Manageability SQL Identification Where is this SQL coming from? SQLs originating from server side PL/SQL units can be identified using the new information in V$SQL. V$SQL (PROGRAM_ID, PROGRAM_LINE#) select o.owner,o.object_name,o.object_type,s.program_line# from dba_objects o, v$sql s where o.object_id = s.program_id and s.sql_id ='66tmsr3446uqn‘; OWNER OBJECT_NAME OBJECT_TYPE PROGRAM_LINE# APPS WF_ITEM_ACTIVITY_STATUS PACKAGE BODY 76
D E M O N S T R A T I O N AWR Report
10g Features DB Console A component of 10g Grid Control Complete Management Portal Alerts Maintenance Performance Administration Availability Space Management SQL Tuning Advisor
D E M O N S T R A T I O N DB Control
11i/10g Batch Improvements Order to Cash Batch10g9iR2Improvement High Volume Order Import49.5K37.5K24% Pick Release46.2K31K33% Ship Confirm146K107K27%
References Oracle’s Business runs on 10gR2 7.5 TB DB 60+ Modules ,000 concurrent users 4 node RAC Cluster Dell Order Management Peak volume: 3.5 million order lines per day Web store Linux RAC Cluster
References BAE Systems 350 GB DB ,000 users 4 node RAC Cluster Timex Order Management million order lines EDW – Supply Chain Intelligence Linux
MetaLink References Note #:Description: Oracle Applications Release 11i with Oracle Database 10gR1 (Interoperability Note) Oracle Applications Release 11i with Oracle Database 10gR2 (Interoperability Note) Using AutoConfig to Manage System Configurations with Oracle Applications 11i Database Initialization Parameters and Configuration for Oracle Applications 11i Recommended Performance Patches for Oracle E-Business Suite