Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oracle Performance tuning: Real world sample Sergey Porokh Oakton Oracle Technical Consultant.

Similar presentations


Presentation on theme: "Oracle Performance tuning: Real world sample Sergey Porokh Oakton Oracle Technical Consultant."— Presentation transcript:

1 Oracle Performance tuning: Real world sample Sergey Porokh Oakton Oracle Technical Consultant

2 Oracle Performance tuning: Real world sample Agenda Functional overview of real world task Existing technical architecture and implementation overview prior to Performance Tuning Bottlenecks of existing solution Techniques to work around performance issues Results of tuning Couple more techniques for PL/SQL programs optimisation

3 Oracle Performance tuning: Real world sample Functional overview: Ageing of Inventory stocks Program prepares permanent data for custom Ageing Discoverer report within Oracle Applications Program is launched for closed financial periods. Say at 15 th March it is run for 28 th February to create February data Once period is closed relevant financial data cannot be added/erased/modified

4 Oracle Performance tuning: Real world sample Receipt 3, $800 per each, +10 each Issue from Receipt2, -1 each Functional overview: Inventory and Cost Management data Report dateSource documentQuantityUnit costAgeing 28 th FebReceipt 110 each$8001 day 28 th FebReceipt 29 each$8801 day Report dateSource documentQuantityUnit costAgeing 31 st MarReceipt 110 each$80032 days 31 st MarReceipt 29 each$88032 days 31 st MarReceipt 310 each$80030 days 27 th Feb28 th Feb01 st Mar t Receipt 1, $800 per each, +10 each Receipt 2, $880 per each, +10 each Current date: onhand quantities and costs

5 Oracle Performance tuning: Real world sample Existing technical architecture Data on a given date = [Onhand quantites/costs] – [transaction data up to end period date] Data is stored at denormalised table partitioned by Period t DecJanFeb Onhand quantities/current costs transactions

6 Oracle Performance tuning: Real world sample Existing implementation Main insert command to end partitioned table Further fields detalisation using complex calculation algorithms Calculated fields are populated by update commands

7 Oracle Performance tuning: Real world sample Bottlenecks of existing implementation Multiple UPDATEs Nested loops forcing Complex recursion algorithm that treated small groups of data No checkpoints saved to restore the data already gathered/calculated in case of abortions

8 Oracle Performance tuning: Real world sample Recursion detalisation Purchase order Receipt Inter-Organisation transfer Disassembling

9 Oracle Performance tuning: Real world sample Techniques to work around performance issues Cascade INSERT commands to interim tables – UPDATE commands/Nested Loops forcing removal BULK processing recursion and storing its results at a permanent table Checkpoints Storage parameters tricks: Nologging, Compress, pctfree 0, APPEND hint Stable execution plans techniques: up to you (Stored Outlines, SQL Profiles, SQL Plan Baselines)

10 Oracle Performance tuning: Real world sample Cascade INSERT commands Table1 Table3 Table4 Table5Table2 Partition for MAR- 2010 Merg e

11 Oracle Performance tuning: Real world sample Bulk processing recursion Purchase order Receipt Inter-Organisation transfer Disassembling ROWCOUNT > 0 Yes No Grab all Table2

12 Oracle Performance tuning: Real world sample Tuning results Overall number of block reads decreased by 14 times Elapsed time on Production decreased by 6 times

13 Oracle Performance tuning: Real world sample Appendix: what else can be applied for OLTP RETURNING INTO clauses (BULK COLLECT option is available) a) Replace update t set f1 = where n = Select f1 into l_f1 from t where n = By 1 clause update t set f1 = where n = returning f1 into b) update t set f1 = where {complex condition} returning n bulk collect into..

14 Oracle Performance tuning: Real world sample Appendix: what else can be applied for OLTP MULTI TABLE INSERTS a) Data conversion tasks: denormalised table to few normalised tables b) Cache INSERT as subquery statement results avoiding RETURNING INTO restrictions applied for subquery INSERTs


Download ppt "Oracle Performance tuning: Real world sample Sergey Porokh Oakton Oracle Technical Consultant."

Similar presentations


Ads by Google