Slow BAPI Performance

We're having some issues regarding BAPI performance.
- BAPI_PO_CHANGE - Deleting all items
- BAPI_SALESORDER_CHANGE - Setting a single custom field
We're getting a runtime of between 5 and 30 minutes for doing a relatively minor change.
For example we have a PO were we're deleting all the items.
ls_poitem-po_item = 00010.
ls_poitem-delete_ind = 'L'.
append ls_poitem to lt_poitem.
ls_poitem-po_item = 00020.
append ls_poitem to lt_poitem.
ls_poitem-po_item = 00030.
append ls_poitem to lt_poitem.
ls_poitemx-po_item = 00010.
ls_poitemx-delete_ind = 'X'.
append ls_poitemx to lt_poitemx.
ls_poitemx-po_item = 00020.
append ls_poitemx to lt_poitemx.
ls_poitemx-po_item = 00030.
append ls_poitemx to lt_poitemx.
call function 'BAPI_PO_CHANGE'
  exporting
    purchaseorder = '1234567890'
  tables
    return        = lt_return
    poitem        = lt_poitem
    poitemx       = lt_poitemx.
if lt_return has no errors.
  bapi_transaction_commit.
endif.
In DEV, the bapi takes around 10 seconds to run, and the commit about 15 seconds. In PRD where there are lots of items, possibly BOMs it is taking between 5 and 30 minutes. The program is running in the day and during the night where hardly anything is going on in the system.
I've done a runtime analysis over the function and the majority of the time seems to be taken dealing with conditions and there are no user exits that are affecting the BAPI. 20% Database, 80% ABAP.
Can anyone explain why the bapis may be taking such a long time to run or whether there is something else I should be looking at?
I have noticed in st02 (buffers) there is a huge amount of swaps occurring, specifically with the import/export buffers. ~ 1 million per day! Would something like this affect anything?
Many Thanks

@Diwakar - I've debugged the bapi (painful!) and there was no noticeable enhancements or exits being called out that appeared to be slow.
@Manu - One of the first things I checked. The program here is just a single PO with no loops.
@Yuri - It does look like it is condition related. The items I used in Dev were not BOMs, but I know in Prd they are used. Here are some results:
Sorted by "No."
No.       Gross =      Net Gross (%) Net (%) Call                                                                                Program Name                     Type No. Filte
8.053     44.950     44.920       0,4     0,4  Perform XKOMV_AUFBAUEN_PRUEFEN                                                         SAPLV61A
6.441     17.595  =  17.595       0,1     0,1  Perform CONDITION_UPDATE_KAWRT                                                         SAPLV61A
6.441     17.335  =  17.335       0,1     0,1  Perform CONDITION_UPDATE_KWERT                                                         SAPLV61A
5.235    480.833    109.490       3,8     0,9  Perform XKOMV_KWERT_ERMITTELN                                                          SAPLV61A
5.208    164.660     34.644       1,3     0,3  Perform KONDITIONSBASIS_ERMITTELN                                                      SAPLV61A
5.077     22.825  =  22.825       0,2     0,2  Perform XKOMV_KKURS_ERMITTELN                                                          SAPLV61A
4.821    407.084  = 407.084       3,2     3,2  Perform XKOMV_KAWRT_ERMITTELN                                                          SAPLV61A
4.092     42.332  =  42.332       0,3     0,3  Perform XKOMV_KBETR_FROM_KWERT                                                         SAPLV61A
4.087     26.921  =  26.921       0,2     0,2  Perform XKOMV_KBETR_ERMITTELN                                                          SAPLV61A
4.079    211.423    147.126       1,7     1,2  Perform XKOMV_FUELLEN_OHNE_KONP                                                        SAPLV61A
4.079      6.374  =   6.374       0,0     0,0  Perform USEREXIT_XKOMV_FUELLEN_O_KONP                                                  SAPLV61A
4.074     12.628     12.598       0,1     0,1  Perform XKOMV_ERGAENZEN_MANUELLE                                                       SAPLV61A
2.387     30.438  =  30.438       0,2     0,2  Perform XKOMV_UEBERTRAGEN_VORBEREITEN                                                  SAPLV61A
2.385     11.630  =  11.630       0,1     0,1  Perform FIXIEREN_KOPFKOND_POSITION                                                     SAPLV61A
1.488      6.066  =   6.066       0,0     0,0  Perform(Ext) KOBED_002                                                                 SAPLV61A
1.188      3.394  =   3.394       0,0     0,0  Perform(Ext) FRM_KONDI_WERT_080                                                        SAPLV61A
  990      9.082  =   9.082       0,1     0,1  Call M. CL_BADI_CACHE_HANDLER=>GET_IMPLEMENTATION                                      BADI_SD_SALES_ITEM============CP
  968      5.325  =   5.325       0,0     0,0  Select Single TCK32                                                                    SAPL0K01                         DB     OpenS
  594      1.633  =   1.633       0,0     0,0  Perform(Ext) FRM_KOND_BASIS_004                                                        SAPLV61A
  575      2.284  =   2.284       0,0     0,0  Perform STATUS_VERKNUEPFEN                                                             SAPLV45P
  483     10.372  =  10.372       0,1     0,1  Perform EXECUTE_CHECK                                                                  SAPLCKDI
  462      7.632  =   7.632       0,1     0,1  Perform CONVERSION_IN2EX                                                               SAPLSDH4
  367      2.957  =   2.957       0,0     0,0  Perform HIDE_INFO_FUELLEN                                                              SAPLSLS_LORD_DFLOW
  340    205.332      8.647       1,6     0,1  Call M. CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE                                    CL_EXITHANDLER================CP
  340     12.255      6.789       0,1     0,1  Call Func. SXV_ADD_PREFIX                                                              SAPLSEXV
  340     15.421      3.166       0,1     0,0  Call Func. SXV_GET_CLIF_BY_NAME                                                        CL_EXITHANDLER================CP
  340      5.466  =   5.466       0,0     0,0  Call Func. SX_NAME_SPACE_SPLIT                                                         SAPLSEXV
  335      4.363  =   4.363       0,0     0,0  Select Single SXS_ATTR                                                                 CL_EXITHANDLER================CP DB     OpenS
  318     12.836      2.092       0,1     0,0  Perform CULLX_EVAL_CND                                                                 SAPLCULL

Similar Messages

  • T520 - 42435gg / Sound stutter and slow Graphic performance with Intel Rapid Storage AHCI Driver

    Hi everybody,
    I have serious Problems with my 42435gg
    Any time I install the Intel Storage AHCI Driver (I've tried plenty of different versions) which is suggested by System Update I experience a horrible Sound stutter and slow Graphic performance in Windows 7 64-Bit.
    The funny thing in this case: If the external e-sata port is connected the problems do not occur. If the port is unused again, the stutter begins immediately.
    The only thing I can do is using the Windows internal Storage Driver with which I am not able to use my DVD recorder for example.
    The device was sent to lenovo for hardware testing with no result. It was sent back without any repairing.
    Anybody experience on this?
    Kind regards,
    Daniel

    Did you try the 11.5 RST beta? Load up DPClat and see if DPC conditions are favorable.
    What are you using to check graphics performance?
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

  • BAPI Performance Issue - 'BAPI_PBSRVAPS_CHANGEKEYFIGVAL'?

    Hi,
    I am using the following BAPI to change the Key figure value . I am using the following Export combinations .
    I am not sure but still the BAPI performance issues we are facing. Is anything else we can use the steps to improve the performance of following BAPI.?
    Also do need to pass more export paramters for the same ? If yes, please share the same how to use that.
    CALL FUNCTION 'BAPI_PBSRVAPS_CHANGEKEYFIGVAL'
        EXPORTING
          PLANNINGBOOK                      = PLANNING_BOOK
         DATA_VIEW                         =
         SELECTION_ID                      =
         LOGICAL_SYSTEM                    =
         BUSINESS_SYSTEM_GROUP             =
         SOURCE_PARTNER                    =
         TARGET_PARTNER                    =
          COMMIT_CONTROL                    = 'E'
    Appreciated your inputs regarding the same.
    Thank you - Prasad.

    Thank you Emmanuel for the response.
    Please see my comments below.
    1. How much data are you passing to the BAPI? (e.g. how many combinations
    Comment : - Min record size is of 6000 records in a file and more .
    2) Are you calling the BAPI just once or multiple times?
    Comment : - No I am calling BAPI for only once.
    3) Are you writing into a very detailed level or an aggregate level?
    Comment : The combination in file used - Product , Location and Key figure Value.
    4) What planning book are you writing on? Does it contain a lot of KFs?
    Comment : There are couple of Key figures in the planning book.
    Please let me know if you have any information on this
    Thank You - Prasad.

  • Slow Effect performance in IE

    hi everyone ,
    I'm using slide effect in this page
    http://www.dostfindik.com.tr/test2
    Effects are working proper in all browsers except ie .
    Does using alpha transparent background png slow down
    performance ?
    thanks.

    check out this:
    http://www.sitepoint.com/blogs/2007/09/18/png8-the-clear-winner/

  • Firefox 4 is extremely slow to perform any function on my lap top compared to previous versions. Why? And how do I change this!

    Firefox 4 is extremely slow to perform any function on my lap top compared to previous versions. Why? And how do I change this!

    Firefox 21 and Firefox 22 running on Windows 7 have been reported to take a long time to "wake up" from sleep. I realize hibernation is different than sleep, but... this is the closest match for your description.
    Some users have reported that this problem is resolved in Firefox 23 (currently in beta). Others have had inconsistent luck with minimizing Firefox before letting Windows sleep and other measures.
    Please check out this (very long) thread for more information: [https://support.mozilla.org/questions/961898 browser freezes after resuming from sleep]
    Or jump to the part about Firefox 23: https://support.mozilla.org/questions/961898?page=3#answer-457321
    The fact that this just started recently suggests perhaps it is related to another program or update, but I don't think anyone has confirmed the exact interaction that causes the problem.

  • Kapsel Fiori Client (FC): self-built iOS FC shows very slow UI performance

    Hi Experts,
    I have used KapselSDK to build our own FC using:
    SMP3.0 KapselSDK SP07_PL00
    Cordova 3.6.3
    Xcode 6.2
    OS X 10.10.2 Yosemite
    Enterprise distribution certificate for deplyment
    .ipa for iPhone4S, 5 (tested)
    ipd also inside Airwatch (tested)
    App config:
      SMP proxy is not used.
    The issue:
    We use FC to launch the Fiori Launchpad where there are some Fiori apps. The problem is that after type usr pwd, it took very long time to see the Launchpad UI. Tried the standard FC from Apple Store, and it worked very fast.
    Does anyone have any idea? I see some info about the slow UI performance for Android devices which can be solved using crosswalk, but my understanding is that crosswalk is not for iOS.
    Thanks.
    Dong

    Have you tired testing the same URL through Mobile Safari to see if it is slow also?
    We have had reports of slowness on iOS and we are researching.  The details are iOS uses HTTP pipelining when the connection is slow. This means iOS bundles several requests (2-3 to our observations) together but the ICM does only response to one of them and ignores the others. After a timeout of about 1 minute (transparent to the FLP) the Safari automatically repeats the ignored requests. It may happen that this happens a second time, but not a third time – then the requests are not repeated anymore.  Seems to happen in Mobile Safari Browser more often than Fiori Client and doesn't happen in Mobile Chrome on same device.
    Thanks,
    Kevin Bates
    SAP AGS

  • EXTREMELY SLOW XQUERY PERFORMANCE AND SLOW DOCUMENT INSERTS

    EXTREMELY SLOW XQUERY PERFORMANCE AND SLOW DOCUMENT INSERTS.
    Resolution History
    12-JUN-07 15:01:17 GMT
    ### Complete Problem Description ###
    A test file is being used to do inserts into a schemaless XML DB. The file is inserted and then links are made to 4
    different collection folders under /public. The inserts are pretty slow (about
    15 per second and the file is small)but the xquery doesn't even complete when
    there are 500 documents to query against.
    The same xquery has been tested on a competitors system and it has lightening fast performance there. I know it
    should likewise be fast on Oracle, but I haven't been able to figure out what
    is going on except that I suspect somehow a cartesian product is the result of
    the query on Oracle.
    ### SQLXML, XQUERY, PL/SQL syntax used ###
    Here is the key plsql code that calls the DBMS_XDB procedures:
    CREATE OR REPLACE TYPE "XDB"."RESOURCEARRAY" AS VARRAY(500) OF VARCHAR2(256);
    PROCEDURE AddOrReplaceResource(
    resourceUri VARCHAR2,
    resourceContents SYS.XMLTYPE,
    public_collections in ResourceArray
    ) AS
    b BOOLEAN;
    privateResourceUri path_view.path%TYPE;
    resource_exists EXCEPTION;
    pragma exception_init(resource_exists,-31003);
    BEGIN
    /* Store the document in private folder */
    privateResourceUri := GetPrivateResourceUri(resourceUri);
    BEGIN
    b := dbms_xdb.createResource(privateResourceUri, resourceContents);
    EXCEPTION
    WHEN resource_exists THEN
    DELETE FROM resource_view WHERE equals_path(res, privateResourceUri)=1;
    b := dbms_xdb.createResource(privateResourceUri, resourceContents);
    END;
    /* add a link in /public/<collection-name> for each collection passed in */
    FOR i IN 1 .. public_collections.count LOOP
    BEGIN
    dbms_xdb.link(privateResourceUri,public_collections(i),resourceUri);
    EXCEPTION
    WHEN resource_exists THEN
    dbms_xdb.deleteResource(concat(concat(public_collections(i),'/'),resourceUri));
    dbms_xdb.link(privateResourceUri,public_collections(i),resourceUri);
    END;
    END LOOP;
    COMMIT;
    END;
    FUNCTION GetPrivateResourceUri(
    resourceUri VARCHAR2
    ) RETURN VARCHAR2 AS
    BEGIN
    return concat('/ems/docs/',REGEXP_SUBSTR(resourceUri,'[a-zA-z0-9.-]*$'));
    END;
    ### Info for XML Querying ###
    Here is the XQuery and a sample of the output follows:
    declare namespace c2ns="urn:xmlns:NCC-C2IEDM";
    for $cotEvent in collection("/public")/event
    return
    <cotEntity>
    {$cotEvent}
    {for $d in collection("/public")/c2ns:OpContextMembership[c2ns:Entity/c2ns:EntityIdentifier
    /c2ns:EntityId=xs:string($cotEvent/@uid)]
    return
    $d
    </cotEntity>
    Sample output:
    <cotEntity><event how="m-r" opex="o-" version="2" uid="XXX541113454" type="a-h-G-" stale="2007-03-05T15:36:26.000Z"
    start="2007-03-
    05T15:36:26.000Z" time="2007-03-05T15:36:26.000Z"><point ce="" le="" lat="5.19098483230079" lon="-5.333597827082126"
    hae="0.0"/><de
    tail><track course="26.0" speed="9.26"/></detail></event></cotEntity>

    19-JUN-07 04:34:27 GMT
    UPDATE
    =======
    Hi Arnold,
    you wrote -
    Please use Sun JDK 1.5 java to perform the test case.Right now I have -
    $ which java
    /usr/bin/java
    $ java -version
    java version "1.4.2"
    gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)
    sorry as I told you before I am not very knowledgeable in Java. Can you tell me what setting
    s I need to change to make use of Sun JDK 1.5. Please note I am testing on Linux
    . Do I need to test this on a SUN box? Can it not be modify to run on Linux?
    Thanks,
    Rakesh
    STATUS
    =======
    @CUS -- Waiting for requested information

  • Macbook pro getting extremely slow in performance

    hey guys, my mid 2012 macbook pro , i5, 4gb , 500hdd is getting **** slow in performance it takes a whooping 40 seconds to boot . i use FCPX , motion 5, after effects , lightroom on an daily basis for editing media.. somtimes it takes almost 3 mins to copy a 2 Gb of Full hd videos from flash memory. is there anything i can do to imporve my overall performace?

    hey guys, my mid 2012 macbook pro , i5, 4gb , 500hdd is getting **** slow in performance it takes a whooping 40 seconds to boot . i use FCPX , motion 5, after effects , lightroom on an daily basis for editing media.. somtimes it takes almost 3 mins to copy a 2 Gb of Full hd videos from flash memory. is there anything i can do to imporve my overall performace?

  • Does loading too many classes into jvm slow down performance?

    hi all,
    does loading too many classes into jvm will slow down performance. Our application is CPU bound, if we use any framework we need to load all the classes related to that framework in JVM. Does this have any effect on the performance of the JVM.
    thanks and regards,
    akmal

    does loading many classes into jvm slow down performance.It will increase the time it takes for the JVM to load your application.
    Our application is CPU boundThe time it takes the JVM to load your application is not likely to be an issue for you then.

  • Jdbc thin driver bulk binding slow insertion performance problem

    Hello All,
    We have a third party application reporting slow insertion performance, while I traced the session and found out most of elapsed time for one insert execution is sql*net more data from client, it appears bulk binding is being used here because one execution has 200 rows inserted. I am wondering whether this has something to do with their jdbc thin driver(10.1.0.2 version) and our database version 9205. Do you have any similar experience on this, what other possible directions should I explore?
    here is the trace report from 10046 event, I hide table name for privacy reason.
    Besides, I tested bulk binding in PL/SQL to insert 200 rows in one execution, no problem at all. Network folks confirm that network should not be an issue as well, ping time from app server to db server is sub milisecond and they are in the same data center.
    INSERT INTO ...
    values
    (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17,
    :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29, :30, :31, :32,
    :33, :34, :35, :36, :37, :38, :39, :40, :41, :42, :43, :44, :45)
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.02 14.29 1 94 2565 200
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.02 14.29 1 94 2565 200
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 25
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net more data from client 28 6.38 14.19
    db file sequential read 1 0.02 0.02
    SQL*Net message to client 1 0.00 0.00
    SQL*Net message from client 1 0.00 0.00
    ********************************************************************************

    I have exactly the same problem, I tried to find out what is going on, changed several JDBC Drivers on AIX, but no hope, I also have ran the process on my laptop which produced a better and faster performance.
    Therefore I made a special solution ( not practical) by creating flat files and defining the data as an external table, the oracle will read the data in those files as they were data inside a table, this gave me very fast insertion into the database, but still I am looking for an answer for your question here. Using Oracle on AIX machine is a normal business process followed by a lot of companies and there must be a solution for this.

  • Jdbc thin driver and bulk binding slow insertion performance

    Hello All,
    We have a third party application reporting slow insertion performance, while I traced the session and found out most of elapsed time for one insert execution is sql*net more data from client, it appears bulk binding is being used here because one execution has 200 rows inserted. I am wondering whether this has something to do with their jdbc thin driver(10.1.0.2 version) and our database version 9205. Do you have any similar experience on this, what other possible directions should I explore?
    here is the trace report from 10046 event, I hide table name for privacy reason.
    Besides, I tested bulk binding in PL/SQL to insert 200 rows in one execution, no problem at all. Network folks confirm that network should not be an issue as well, ping time from app server to db server is sub milisecond and they are in the same data center.
    INSERT INTO ...
    values
    (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17,
    :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29, :30, :31, :32,
    :33, :34, :35, :36, :37, :38, :39, :40, :41, :42, :43, :44, :45)
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.02 14.29 1 94 2565 200
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 0.02 14.29 1 94 2565 200
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 25
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net more data from client 28 6.38 14.19
    db file sequential read 1 0.02 0.02
    SQL*Net message to client 1 0.00 0.00
    SQL*Net message from client 1 0.00 0.00
    ********************************************************************************

    I have exactly the same problem, I tried to find out what is going on, changed several JDBC Drivers on AIX, but no hope, I also have ran the process on my laptop which produced a better and faster performance.
    Therefore I made a special solution ( not practical) by creating flat files and defining the data as an external table, the oracle will read the data in those files as they were data inside a table, this gave me very fast insertion into the database, but still I am looking for an answer for your question here. Using Oracle on AIX machine is a normal business process followed by a lot of companies and there must be a solution for this.

  • Continued SLOW online performance after two Archive & Installs

    Hi.
    I have been living with slow online performance – pages slow to load, movies very slow to load, movies don't play back smoothly, constant buffering – for some 3-4 months before trying to do something about it... (this timeline coincides with a potential Security Update 2008-006 issue discussed here: http://discussions.apple.com/thread.jspa?threadID=1730909&tstart=0 , but I don't have enough savvy to know if that's the problem.)
    Equivalent slow performance in both Safari and Firefox... I've compared the same sites I visit on other peoples workstations, PC and Mac, various ISPs – all of their pages and movies light up and play instantly.
    Tried to research and do as much as I could before coming here, but I don't have great diagnostic skills... here's what I've got so far:
    By late November, I managed to eliminate the ISP (Earthlink) as a cause of the problem... however, due to their direction to change DNS numbers, I can no longer automatically connect online upon booting, but must repeatedly connect via Internet Connect (separate issue?)... via these forums, I've reset the DNS to 208.67.220.220, 208.67.222.222.
    Neither hard drive is even half full.
    I did an initial Disk and Permissions Repair prior to first A&I... they needed repair then, but subsequent verifications check out clean.
    After the first A&I (using the original OS X 10.4 install disk), I downloaded a complete full 10.4.11 update, including all current Security Updates... performance wound up much the same as before.
    After the second A&I, and before any updating, I tested online performance – still slow... this time I downloaded only the Mac OS X 10.4.11 Combined Update from November 07, looking to avoid the 2008-006 Security Update... general browsing speed is slightly improved, but any site with a movie or rich graphics behaves like dial-up, as before... Mail is just ok – not fast, but not problematic.
    Otherwise, the Mac works well enough, but it's never been a real speed-burner, imo... mainstream graphics apps (Adobe CS2, Quark 6)... the only atypical thing I might have is a Wacom graphics tablet (Intuos 3), but it's always worked fine... no games or brand-X playtime software.
    The only other thing I'd be suspicious of is Network Settings, after getting the runaround at Earthlink... but the fact that I can get online at all might rule that out.
    I've been at this for days, and am out of ideas... little help?
    Thanx.

    OK, network settings is the scary stuff that I DO NOT understand...
    BDAqua wrote:
    Make a New location in Network>Location>New, try it without PPoE, just Using DHCP under the TCP/IP tab>IPv4 setting. You can always switch back if it doesn't work.
    I found the PPPoE subpane.
    Made the New location, it seemed to work briefly, then didn't, then I fumbled my way back to prior settings... I'm willing to try it again, BUT...
    What scared me was that after setting New Location, the browser window opened to something called *Internet Configurator*, never seen this before... it asked for my email and password... is this normal?... I've got major privacy and security concerns and DO NOT want to put that password out there if I don't have to.
    Please advise before I do this... thanks.

  • Installation of Yosemite 10.10.1 has severely slowed the performance of my Mac.  Takes a long time to start-up and to load any apps.  Any suggestions?

    Installation of Yosemite 10.10.1 has severely slowed performance of my Mac Mini.  Tales a long time to start, and a very long time to start any apps.

    Open Activity Monitor and kill this process - rapportd.
    Reinstalling OS X Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Reinstalling OS X Without Erasing the Drive
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the Macintosh HD entry from the the left side list.  Click on the First Aid tab, then click on the Repair Disk button. If Disk Utility reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit Disk Utility and return to the main menu.
    Reinstall OS X: Select Reinstall OS X and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    Alternatively, see:
    Reinstall OS X Without Erasing the Drive
    Choose the version you have installed now:
    OS X Yosemite- Reinstall OS X
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

  • While creating Billing, system is very slow..performance issue

    Hi,
    While creating Billing, system is very slow. How can I debugg and provide the analysis where is the exact problem.
    This is showing performance issue.
    Waiting for kind response.
    Best Regards,
    Padhy
    Moderator Message : Duplicate post locked.
    Edited by: Vinod Kumar on May 12, 2011 10:59 AM

    hi,
    Chk the links
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/e71f39488fee0ce10000000a114084/content.htm
    Re: How to create Secondary Index?
    How may secondary indices I can create on the ODS?
    Deletion of ODS index
    Ramesh

  • SLOW report performance with bind variable

    Environment: 11.1.0.7.2, Apex 4.01.
    I've got a simplified report page where the report runs slowly compared to running the same query in sqldeveloper. The report region is based on a pl/sql function returning a query. If I use a bind variable in the query inside apex it takes 13 seconds to run, and if I hard code a string it takes only a few hundredths of a second. The query returns one row from a table which has 1.6 million rows. Statistics are up-to-date and the columns in the joins and where clause are indexed.
    I've run traces using p_trace=YES from Apex for both the bind variable and hard coded strings. They are below.
    The sqldeveloper explain plan is identical to the bind variable plan from the trace, yet the query runs in 0.0x seconds in sqldeveloper.
    What is it about bind variable syntax in Apex that is causing the bad execution plan? Apex Bug? 11g bug? Ideas?
    tkprof output from Apex trace with bind variable is below...
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM(:P71_SEARCH_SOURCE1)))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.01          0          1         27           0
    Fetch        2     13.15      13.22      67694      72865          0           1
    total        4     13.15      13.23      67694      72866         27           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=72869 pr=67694 pw=0 time=0 us cost=29615 size=14255040 card=178188)
          1   FILTER  (cr=72869 pr=67694 pw=0 time=0 us)
          1    HASH JOIN RIGHT SEMI (cr=72865 pr=67694 pw=0 time=0 us cost=26308 size=14255040 card=178188)
          1     INDEX FAST FULL SCAN IDX$$_0A300001 (cr=18545 pr=13379 pw=0 time=0 us cost=4993 size=2937776 card=183611)(object id 68485)
    1696485     TABLE ACCESS FULL PERSONS (cr=54320 pr=54315 pw=0 time=21965 us cost=14958 size=108575040 card=1696485)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     HASH JOIN (RIGHT SEMI)
          1      INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                     'IDX$$_0A300001' (INDEX)
    1696485      TABLE ACCESS   MODE: ANALYZED (FULL) OF 'PERSONS' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file scattered read                       1276        0.00          0.16
      db file sequential read                       812        0.00          0.02
      direct path read                             1552        0.00          0.61
    ********************************************************************************Here's the tkprof output with a hard coded string:
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM('0b')))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.02       0.04          0          0          0           0
    Execute      1      0.00       0.00          0          0         13           0
    Fetch        2      0.00       0.00          0          8          0           1
    total        4      0.02       0.04          0          8         13           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=10 pr=0 pw=0 time=0 us cost=9 size=80 card=1)
          1   FILTER  (cr=10 pr=0 pw=0 time=0 us)
          1    NESTED LOOPS  (cr=8 pr=0 pw=0 time=0 us)
          1     NESTED LOOPS  (cr=7 pr=0 pw=0 time=0 us cost=8 size=80 card=1)
          1      SORT UNIQUE (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1       TABLE ACCESS BY INDEX ROWID PERSON_SYSTEMS (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1        INDEX RANGE SCAN IDX_PERSON_SYSTEMS_SOURCE_KEY (cr=3 pr=0 pw=0 time=0 us cost=3 size=0 card=1)(object id 68561)
          1      INDEX UNIQUE SCAN PK_PERSONS (cr=3 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 68506)
          1     TABLE ACCESS BY INDEX ROWID PERSONS (cr=1 pr=0 pw=0 time=0 us cost=2 size=64 card=1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     NESTED LOOPS
          1      NESTED LOOPS
          1       SORT (UNIQUE)
          1        TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                       'PERSON_SYSTEMS' (TABLE)
          1         INDEX   MODE: ANALYZED (RANGE SCAN) OF
                        'IDX_PERSON_SYSTEMS_SOURCE_KEY' (INDEX)
          1       INDEX   MODE: ANALYZED (UNIQUE SCAN) OF 'PK_PERSONS'
                      (INDEX (UNIQUE))
          1      TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                     'PERSONS' (TABLE)

    Patrick, interesting insight. Thank you.
    The optimizer must be peeking at my bind variables with it's eyes closed. I'm the only one testing and I've never passed %anything as a bind value. :)
    Here's what I've learned since my last post:
    I don't think that sqldeveloper is actually using the explain plan it says it is. When I run explain plan in sqldeveloper (with a bind variable) it shows me the exact same plan as Apex with a bind variable. However, when I run autotrace in sqldeveloper, it takes a path that matches the hard coded values, and returns results in half a second. That autotrace run is consistent with actually running the query outside of autotrace. So, I think either sqldeveloper isn't really using bind variables, OR it is using them in some other way that Apex does not, or maybe optimizer peeking works in sqldeveloper?
    Using optimizer hints to tweak the plan helps. I've tried both /*+ FIRST_ROWS */ and /*+ index(ps pk_persons) */ and both drop the query to about a second. However, I'm loath to use hints because of the very dynamic nature of the query (and Tom Kyte doesn't like them either). The hints may end up hurting other variations on the query.
    I also tested the query by wrapping it in a select count(1) from ([long query]) and testing the performance in sqldeveloper and in Apex. The performance in that case is identical with both bind variables and hard coded variables for both Apex and SqlDeveloper. That to me was very interesting and I went so far as to set up two bind variable report regions on the same page. One region wrapped the long query with select count(1) from (...) and the other didn't. The wrapped query ran in 0.01 seconds, the unwrapped took 15ish seconds with no other optimizations. Very strange.
    To get performance up to acceptable levels I have changed my function returning query to:
    1) Set the equality operator to "=" for values without wildcards and "like" for user input with wildcards. This makes a HUGE difference IF no wildcard is used.
    2) Insert a /*+ FIRST_ROWS */ hint when users chose the column that requires the sub-query. This obviously changes the optimizer's plan and improves query speed from 15 seconds to 1.5 seconds even with wildcards.
    I will NOT be hard coding any user supplied values in the query string. As you can probably tell by the query, this is an application where sql injection would be very bad.
    Jeff, regarding your question about "like '%' || :P71_SEARCH_SOURCE1 || '%'". I've found that putting wildcards around values, particularly at the beginning will negate any indexing on the column in question and slows performance even more.
    I'm still left wondering if there isn't something in Apex that is breaking the optimizer "peeking" that Patrick describes. Perhaps something in the way it switches contexts from apex_public_user to the workspace schema?

Maybe you are looking for