Application performance tuning

Hello


The Oracle version:-10.2.0.5

I post the question in SQL and PL/SQL Forum, but have received no answer, so posting here.


We tried to address a performance problem in our system, which is a layer of ETL to another application and receives data in the form of flat files on a daily basis. The received data are loaded into a temporary, not physically temporary table but appointed to keep the data for 2 days, after which it will be deleted. Late in the day, all the data is copied from temporary tables to the actual tables, which have a 5 days retention policy.


Many medium-sized lines worked for each day is 1.8 to 2 million. And the number of lines for the most part remains stable in each of the two tables.

There are 5 packages, each containing about 3 applications similar to those mentioned below (with minor differences) and there are about 5-7 jobs to execute the package at a time. This amounts to 15-20 performance of both statements.

The AWR report

Name of the statistic Time (s) % of time of DB
Execute SQL elapsed time15,807.6297.12
DB CPU9,667.99room 59,40

This is the number of data in the two tables is as below:

OUT_TABLE OUT_TEMP

------------------        --------------------

8763750 5255109

Each of these tables is Composite partition-ed, primary partition Date (range) and the partition of Sub (list) on File_Name; Each with an Index.


Each table has partition-ed Index locally on Job_Activity_Id, STMTDATE, File_Key.


SQL: -.

merge into out_temp today using

(

Select s.trade_id,

s.notional_amount,

s.CCY

of s out_table

where s.stmtdate = to_date (: b3, 'Dd-MON-yy')

and s.job_activity_id =: b2

and s.trade_id <>'VS '.

and s.file_key =: b1

)

yday on

(

Today.stmtdate = to_date (: b5, ' DD/MM/YYYY') and today.trade_id =

yday.trade_id and today.job_activity_id =: b4 and nvl (today.ccy,

'x') = nvl (yday.ccy, 'x')

)

When matched then

Update

Set today.amount_tm1 = nvl

put in correspondence, then setting a day value today.amount_tm1 = NVL (YDAY. NOTIONAL_AMOUNT, 0);

After being assured, the statistics were gathered, we executed the SQL and found that it was still too much running. Below is the explain plan retrieved by running the wizard to set up the SQL (Plan 1):

------------------------------
Hash value of plan: 3678662366

-----------------------------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name                          | Lines | Bytes | Cost (% CPU). Time | Pstart. Pstop |
-----------------------------------------------------------------------------------------------------------------------------------------
|   0 | MERGE STATEMENT |                               | 43822.   641K |    22 M (1) | 73:52:39 |       |       |
|   1.  MERGE                                  | OUT_TEMP |       |       |            |          |       |       |


|   2.   VIEW                                  |                               |       |       |            |          |       |       |
|*  3 |    TABLE ACCESS BY LOCAL INDEX ROWID | OUT_TABLE |     1.    42.  1781 (1) | 00:00:22 |       |       |
|   4.     NESTED LOOPS |                               | 43822.  9543K |    22 M (1) | 73:52:39 |       |       |
|   5.      RANGE OF SINGLE PARTITION |                               | 12447.  2200K |   716 (1) | 00:00:09 |   KEY |   KEY |
|   6.       PARTITION LIST ALL |                               | 12447.  2200K |   716 (1) | 00:00:09 |     1.    22.
|*  7 |        TABLE ACCESS BY LOCAL INDEX ROWID | OUT_TEMP | 12447.  2200K |   716 (1) | 00:00:09 |   KEY |   KEY |
|*  8 |         INDEX RANGE SCAN | IDX_TMP_PART_1 |  8133 |       |   126 (0) | 00:00:02 |   KEY |   KEY |
|   9.      RANGE OF SINGLE PARTITION |                               |  8852.       |   271 (1) | 00:00:04 |   KEY |   KEY |
|  10.       SIMPLE LIST OF PARTITION.                               |  8852.       |   271 (1) | 00:00:04 |   KEY |   KEY |
| * 11 |        INDEX RANGE SCAN | IDX_OUT_TABLE_PART_1 |  8852.       |   271 (1) | 00:00:04 |   KEY |   KEY |
-----------------------------------------------------------------------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):
---------------------------------------------------

3 - filter("S".") TRADE_ID ' <>'VS' AND 'Today'. " TRADE_ID "=" S ". "" TRADE_ID "AND
NVL ('TODAY'. ("' CTL ', 'x') = NVL ("S". "CTL", 'x')) "
7 - filter("TODAY".") TRADE_ID' <>'VS')
8 - access("TODAY".") JOB_ACTIVITY_ID ' =: B4 AND 'TODAY'. " STMTDATE "= TO_DATE (: B5,' DD/MM/YYYY)"))
11 - access("S".") JOB_ACTIVITY_ID "= TO_NUMBER(:B2) AND"S". "STMTDATE"= to_date(:B3,'dd-mon-yy') AND "S". "FILE_KEY"(=:B1) "



STA, recommended to accept and apply a profile that has the hash join and the plane of the explain output looks like below (Plan 2):

--------------------
Hash value of plan: 1140122102

------------------------------------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name                          | Lines | Bytes | TempSpc | Cost (% CPU). Time | Pstart. Pstop |
------------------------------------------------------------------------------------------------------------------------------------------------


|   0 | MERGE STATEMENT |                               | 43822.   641K |       |  2731 (1) | 00:00:33 |       |       |
|   1.  MERGE                                 | OUT_TEMP |       |       |       |            |          |       |       |
|   2.   VIEW                                 |                               |       |       |       |            |          |       |       |
|*  3 |    HASH JOIN |                               | 43822.  9543K |  2352K |  2731 (1) | 00:00:33 |       |       |
|   4.     RANGE OF SINGLE PARTITION |                               | 12447.  2200K |       |   678 (1) | 00:00:09 |   KEY |   KEY |
|   3:      PARTITION LIST ALL |                               | 12447.  2200K |       |   678 (1) | 00:00:09 |     1.    22.
|*  6 |       TABLE ACCESS BY LOCAL INDEX ROWID | OUT_TEMP | 12447.  2200K |       |   678 (1) | 00:00:09 |   KEY |   KEY |
|*  7 |        INDEX RANGE SCAN | IDX_OUT_TMP_PART_2 |  8133 |       |       |    88 (0) | 00:00:02 |   KEY |   KEY |
|   8.     RANGE OF SINGLE PARTITION |                               | 60775.  2492K |       |  1782 (1) | 00:00:22 |   KEY |   KEY |
|   9.      SIMPLE LIST OF PARTITION.                               | 60775.  2492K |       |  1782 (1) | 00:00:22 |   KEY |   KEY |
| * 10 |       TABLE ACCESS BY LOCAL INDEX ROWID | OUT_TABLE | 60775.  2492K |       |  1782 (1) | 00:00:22 |   KEY |   KEY |
| * 11 |        INDEX RANGE SCAN | IDX_OUT_TABLE_PART_1 |  8852.       |       |   272 (1) | 00:00:04 |   KEY |   KEY |
------------------------------------------------------------------------------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):
---------------------------------------------------

3 - access("TODAY".") TRADE_ID "=" S ". "" TRADE_ID "AND NVL ('TODAY'. ("' CTL ', 'x') = NVL ("S". "CTL", 'x')) "
6 - filter("TODAY".") TRADE_ID' <>'VS')
7 - access("TODAY".") JOB_ACTIVITY_ID ' =: B4 AND 'TODAY'. " STMTDATE "= TO_DATE (: B5,' DD/MM/YYYY)"))
10 - filter("S".") TRADE_ID' <>'VS')
11 - access("S".") JOB_ACTIVITY_ID "= TO_NUMBER(:B2) AND"S". "STMTDATE"= to_date(:B3,'dd-mon-yy') AND "S". "FILE_KEY"(=:B1) "

What I don't understand is, even when the cardinality of 1 Plan is higher than that of Plan 2, why should Oracle opt for a loop nested hash instead of the join? Can someone help me please point to the question and if possible a way to fix it?

It just occurred to me that we can be deceived by a simple combination of events that links a plan generated when statistics have been exceeded with the STA capture and playback of this plan with statistics that have been updated.  My earlier suggestion on the execution of the query and capture the real plan and the workload (with or without a profile) is the key. In the meantime, however, can you check whether or not collect you statistics immediately after loading your 2 M or more data lines.

Note: If you only have 2 days of data in the table then the statistics that speak of "yesterday" is 50% out of reach, his stats about two days ago are 100% out of reach and very likely to produce a very stupid and expensive NL plan.

Concerning

Jonathan Lewis

Tags: Database

Similar Questions

  • Oracle Application Performance Tuning

    Hi all
    Please forgive me if I'm asking this in the wrong section.

    I'm an engineer s/w with 2 years exp. I worked as a tuning performance for Oracle EBS resource in my company. Jobs in question especially SQL tuning and treating indices etc. At the moment I took interest in s/n things, and I finished my TRAY in Oracle 10 g. Now, my company gives me the opportunity to move to a team of DBA of the Application and I'm totally confused about this.

    Becoming a DBA Apps means that the effort that I put in the certification in 10g will be of no use. There are other Apps DBA certification documents. I should stay put in performance tuning & wait for a chance to base DBA or I will accept the opportunity to Apps DBA.

    Also, did my exp. in SQL tuning performance hold any value as such with exposure to activities of s/n?

    Please guide me in this matter I am very confused right now.

    Kind regards
    Lucette

    Lucette wrote:
    Hello bigdelboy, thank you very much for your answer.

    Yes, I meant by oracle Apps DBA Oracle EBS.

    1Z0-046 clearing, is an option. However, my question is will delete both reviews the Admin I and Admin II being of any help, bypassing the expericnce practice? The EBS DBA work involves support and patching, cloning and installation of the new node etc.

    Also, is my performance tuning experience will help me somehow on the way forward as a DBA / EBS DBA?

    Thank you for your valuable time.

    Kind regards
    Lucette Sarath

    The way I read it is that.

    People notice that you are able to understand and SQL performance. And you must have some knowledge of Oracle EBS. And in fact, you also have a DBA OCA.

    So, there are 98% + chance you can be transformed into a good Oracle Apps DBA (and the core s/n). If I was in their position I want you on my team. It's the way we used to bring on DBA in the old days before approval, and he still has a lot of merit. OK you can only do tasks limited at first... but the number of taks you can do will increase substantially in recent months.

    I imagine that the Oracle Apps DBA will be pleased to have a person on board who can tune SQL which sometimes can sometimes seem more like an art than a science of performance. The application of patches, etc. can be taught in small doses. If they are a good team, they're not trying to give you all at once, they'll get to learn one procedure at a time.

    And remember, if in doubt ask. and if you do not understand ask again. And be safe and not sorry on actions that could be serious.

    .................

    If your fear on liinux: recipes of Linux for Oracle DBA (Apress) might be a good book to read but can be expensive in India
    Same: (Oracle Applications Dba field Guide) can agree, and the same (Rman recipes for Oracle Database 11 g A problem-solution approach) can have some value if you need to get fast speed in these areas.
    They are not perfect, but they sometimes have to consolidate the information carefully; However only buy if you think they are pretty cheap. You can buy them well and feel disappointed (these all is found by Apress which have produced a number of good books... they also published some waste as well)

    And review the dba examples 2 days as well and install examples n OTN linux so... they are free from books I mentioned.

    Rgds - bigdelboy.

  • Will there be any tools avialable to the on query performance tuning

    Hello

    How to tune a database query?
    Suppose that there are basic query "select * from emp where empid = '1101' ';"

    Y at - it all avilabale tools to suggest performance Tuning on a query?

    How can I resolve this application, and what is the best approach on this?

    Please share your ideas and thanks.

    Oracle provides tools such as SQL Trace and TKPROF. For the information on a SQL query.

    But basically, you should know how oracle works. You must be aware of the different access plans and know why they are being used.

    You need to know when to use an index and when not to use a.

    There are many more. Best thing for you would be to start reading the document.

  • Foglight performance tuning - Cache Code JVM

    Just curious about this setting. Currently, our new FMS are amazing. But I noticed this option in the field guide. No indication on that? The docs a bit thin. When I use it? What is the default if I don't specify? How to monitor the need to increase this?

    Performance Tuning field Guide

    To optimize the execution of code in larger environments, you can increase the size of the

    JVM code cache.

    To increase the size of the JVM code cache:

    1 open /config/foglight.config.

    2. change the line foglight.vm.option0 as follows:

    Foglight.VM.option0 = '-XX:ReservedCodeCacheSize = 128 m "

    3. restart the management server.

    The default setting is different based on the platform of the JVM.

    It is default to 1024 m on 64-bit systems or 32 m on most systems except Solaris where it could be 48 m.

    It sets the size used by the cache code during compilation JIT compiler. If this cache is small you will receive errors like this in the log file

    Java HotSpot(TM) Client VM warning: CodeCache is full. Compiler has been disabled. Java HotSpot(TM) Client VM warning: Try increasing the code cache size using -XXReservedCodeCacheSize=

    And it allows to disable the JIT compiler, which will result in reduced performance because all dynamic logic as rules and other groovy scripts will no longer be dealt with by the JIT.

    The default settings will work in most cases, but a big FMS with many objects and rules may require a greater reserve of cache to keep the happy JIT compiler.

    Stefan

  • can I use "Oracle Database 12 c: performance management and Tuning" training for the certification "Oracle Database 11g: Performance Tuning 1Z0-054 '"»

    I took "Oracle Database 12 c: new performance management and Tuning" the oracle University training. Now I would like to get certified on "Oracle Database 11g: Performance Tuning 1Z0-054 ' exam. Is this possible?

    I guess you ask if you can use the course 12 c as long as the condition of course for the review of 11g.  Over 12 c is not listed as one of the options for the 11 g certification and course requirements are normally specific version - at least with DBA certifications.  If you are already an Oracle OCP DBA, of course, there is no requirement of course for the review of performance tuning.  From what I know the training requirements for other certifications, I do not that you will be able to use it. However, Brandye will provide a definitive answer to whether the course 12 c would be acceptable for 11g certification.

    That said, I'm with John - 12 c review is about a community of 85 to 90% in the review of the 11g and is currently about 20% of the price while it is in beta.  What is the point of trying to cross the releases?

  • 1Z0-054: Oracle Database 11g Performance Tuning Expert

    I intend to give the exam 1z0-054 for the certification, "Oracle Database 11g Performance Tuning Expert".

    The path to Certification indicates that, if you are 'OCP DBA 11 g' then you can directly take this article and there is no requirement for training instructor. Therefore, I decided to prepare my own. Can someone guide me on study material and landfills?

    Kind regards

    Ahmer Mansoor

    Therefore, I decided to prepare my own. Can someone guide me on study material and landfills?

    First of all, the word "shock" has a precise meaning. It is short for "landfills of brain", which are illegal and can cost you this certification and all others you have taken.

    http://blogs.Oracle.com/certification/entry/0477

    Second - there is currently no study guide or a specific book to this certification at the moment. I write the study guides and this one is actually next on my list when I finished the current book to * 1Z0-117: Oracle Database 11 g Release 2: SQL Tuning *. I have a guide for 1Z0 - 054 before sometime in may more likely. That said, I have a few links for legal study on the companion Web site material for my series of guide to the subjects for this exam. It also has links to the Oracle documentation that contains the information you need. Once I have started writing the book review, links will develop quickly because I research for her themes and links to the documentation could extend as well.

    http://www.oraclecertificationprep.com/Apex/f?p=OCPSG:EXAM_DETAILS:0:no:P2_EXAM:1Z0 - 054

  • Dates for "Oracle Database 11g: Performance Tuning" exam

    Hello!

    Today Oracle posted the info on the new database Oracle 11 g Performance Tuning review required for new certification expertise:

    http://education.Oracle.com/pls/web_prod-PLQ-dad/db_pages.GetPage?page_id=41 & p_exam_id = 1Z0_054 #2

    It is said that pre-registration for the beta version review starts today, however, it does not say when the phase beta begins and ends. Anyone know?

    Thank you
    Marcus

    March 31, 2009 is the current provisional end date for the exam in beta 1Z1-054. This date is subject to change.

    Kind regards
    Brandye Barrington
    Certification Forum Moderator
    Manager certification program

  • Difficulty of fix DBA Performance Tuning applications

    Hello
    I had an interview, which the DBA team leader asked me about my expereince of performance

    I met on my expereince in the sqls of tuning and get a good statistic so the CBO choose the best plan, or even hint my sqls so I force the best plan

    the interviwer was worried because he is an application development, does not a DBA tuning
    mention of He that he wanted to hear that I've changed a setting db that improve performance, or change something in the DBA team that optimize performance

    Does anyone have an example of changing the setting or something DBAish that helps the performance?

    Thanks for any input

    Index rebuild or change the block size?

    (game of lights and stands back)

    Choose a parameter, a parameter, for example:
    How about increasing size of log file to reduce log file switches?
    With the help of async_io?
    Change of db_multiblock_io_count, optimizer_index_adj.
    Going between manual and automatic memory management.
    The fast setting = true ;) etc, etc.

  • many applications perform the battery life of the iphone 6.

    Hello, I use iphone 6, I just want to know that if I use/install Apps from 30-40, this will affect my iPhone battery timing?

    I have recently install Apps 12-15, the battery is fine now, but if I install more apps in my iPhone, is it's going to make my iPhone battery Timing?

    Thank you

    The point is not in the number of installed applications. The key is how often and how long you use these applications.

    Here you will find some useful tips on how to make the life of your device's battery more long. They work for 8 and 9 IOS iOS.

    http://www.IMore.com/battery-life-problems-iOS-9-heres-fix

    https://www.Apple.com/batteries/maximizing-performance/

    sues-iPhone-iPad-and-iPod-422229 http://www.idigitaltimes.com/iOS-82-Battery-Life-Problems-How-Fix-Quick-drain-is

    I hope this helps!

  • include in application performance moitor profile

    Hi all

    I have a (maybe stupid) question about the performance of profile and monitor memory used in LabVIEW.

    Is it possible to include this monitor in an application?

    Concerning

    Heinrich Eidloth

    Hello Norbert_B,

    It's just an idea that came to my mind. I thought about a "hidden feature" (sort of) for developers in an application.

    Thank you

    Heinrich

  • How to get on the application performance?

    Hi guys.

    I am looking at the performance of applications such as CPU, memory utilization etc.

    In other words, I want to know how the application gets the performance itself.

    For the code, what classes use?

    Thanks in advance.

    I think that aid in the JDE has some information and find you a brief, but useful reference in this video:

    http://www.BlackBerry.com/DevMediaLibrary/view.do?name=GarbageCollection

  • 1Z0-024 1Z0-054 vs Performance Tuning

    Hello

    obiously, they are tests for very different versions (8i vs 11g), but if you take that into consideration, I think they are very similar... But in Oracle 8i you had to pass 5 exams (Yes FIVE!) If you want to get your OCP. Today, you get 11G OCP with 3 tests... and if you pass 1Z0-054 you have one cerfitication others...

    Is this true?

    Are different so the two reviews?, it seems that they are very similar (all similar which can be oracle 8i and oracle 11g)

    Anyone who has had 1z0-024 (there are almost 13 years) took 1z0-054?

    Concerning

    Is this true?

    I guess that what you are asking to be true is that the 11g OCP requires three exams (TRUE) and passing the 1Z0 - 054 you grant OCÉ certification in addition to the 11 g OCP (also TRUE).  Theoretically, you could also win the 11g tuning certification without an OCP, but there're so much, we need practical training that must also be met.

    Are different so the two reviews?, it seems that they are very similar (all similar which can be oracle 8i and oracle 11g)

    Well, I don't have a handy list of topics for 1Z0 - 024, so I'll work from subjects for 1Z0 - 054 and extrapolate. First of all, I will list some of the topics in 054 which are features that did not exist in 8i:

    Automatic maintenance AWR, ADDM, tasks, reports of ASH, database Resource manager, planner of the Oracle, SQL tuning automatically, planning Plan SQL, SQL Performance Analyzer, Database Replay, Automatic Shared Memory Management, automatic memory management, space management auto Segment, Segment retractable, Automatic Storage Management, Statspack.

    Please note that the list above is perhaps not complete.  I might have missed some.  However, I think I can answer your question with confidence, saying: "Yes - the two reviews are very different."

  • Audit report - HFM application performance

    Hello

    I use HFM 11.1.1.3 application and currenlty the audit report is disable in shared services. I just want to know what is the impact to enable shared services audit report. If it will affect the performance of the HFM applications? I want to know what are the impacts of the audit.

    Thank you

    Michel K

    Hi Pascal,.

    Allowing the audit report to the SSP don't directly affect performance HFM.  Audit data is stored in the HSS database in tables separate (SMA_) and the only HFM associated with options to log are retrieved and imports of LCM.  If you choose only a handful of the audit tasks, it maybe not number of records written in the database at all.  If you choose to connect everything, be sure to include serving the information as part of your ongoing process (quarterly or annually should do unless there is a significant activity HSS).

    Thank you

    Erich

  • Client Server application performance impact due to the strong issue of retransmission of TCP packets

    People,

    I'm having problem of performance of serious application with my vSphere environment where I deployed a couple of database SQL Server stand-alone VMs (4 x VM) to be used by some applications virtual computers servers (4 x stand alone VMs) running Oracle Forms (Java) servers. Users connect from their own workstation to various geographic locations in Asia, the data center is in Australia.

    User (150 users of workstations Win7) - RDP-TCP/3389-> Terminal Server VM pool (one of the 45 x VM available) -Oracle Forms app TCP/80-> Application Server HTTP -SQL Server TCP/1433-> SQL Server VM.

    Somehow, report of the team of the network there are some consistent event TCP retransmit the packet between the Application Server to the database, as well as between Terminal servers.

    the accident occurred in any type of scenario same ESXi host or even different ESXi

    Material:

    HP BL 465c G7/G8 blades on c7000 enclosure

    HP Virtual Connect modules

    Software:

    vSphere U1 5.1 for all blades HP running ESXi and VCenter server.

    All terminal Servers Server (RDSH) and the OS: Windows Server 2008 R2 SP1 STD.

    Database: SQL Server 2005 and 2008 R2

    What could cause the TCP retransmission on the virtual environment?

    wreedMH, what kind of problem you encounter on your server environment blade HP?

    What I did:

    1 perform the update firmware on blade HP, ANC and also updated the drivers of ESXi for last October 2015 using HP SPP.

    2. upgrade to the last update of VMware ESXi 5.1 3 b build number 2323236.

    3. switch to level the latest VMware tools v10.0.5 after having done both above.

    4. follow VMware KB: big packet loss at the OS level invited on the VMXNET3 vNIC in ESXi small buffers Rx = 8192 and Rx ring #1 size = 4096


    Hope that helps.

  • create the Application performance report

    All,
    pages/IAM trying to implement the analytical report / / graphic to show the performance of the application several times. What is the best way to do it? Thanks in advance.

    Take a look at the following views of apex

    apex_workspace_activity_log

    apex_workspace_access_log

    Gus

    Published by: Gus C Sep 6, 2012 22:29

Maybe you are looking for

  • Photo of logon screen

    How to change the image displayed on the logon screen? (Background)

  • error message "browser" too recent for the password Bank

    I am running Vista on my laptop, just updated my browser and I get the following error message "too recent browser to the password Bank" I can't save my passwords or usernames. Is there a way I can fix this?

  • wireless connected but internet does not work

    Since yesterday my laptop has had problems connecting to the internet. It will say that it is connected to the internet but yet when I open a browser or any other program requiring internet, it does not work. However, when I use the same connection f

  • I want to update window7 professional window7

    Separated from this thread. I want to update window7 window7 proeftional

  • 2503 power dock

    After talking with four people at Lenovo/IBM support, as well as to quite a bit of digging on my own, I was unable to increase the part number for the docking of 2503 advanced for my T500. The part number of the is42W4629 docking station. All I need