DELETE Statement takes long time running

Hi,
DELETE statements take a very long time to complete.
Can you advice me how can I diagnostic the slow performance
Thanks

Deleting rows can be an expensive operation.
Oracle stores entire row as the 'before image' of deleted information (table and index data) in
rollback segments, generates redo (keeps archiver busy), updates free lists for blocks that are
falling below PCTUSED setting etc..
Select count(*) runs longer because oracle scans all blocks (upto the High Water Mark) whether
there are or are not any rows in the blocks.
These operations will take more and more time, if the tables are loaded with APPEND hint or
SQL*Loader using direct mode.
A long time ago, I ran into a similar situation. Data was "deleted" selectively, SQL*Loader was
used (in DIRECT mode) to add new rows to the table. I had a few tables using more number of blocks
than the number of rows in the table!
Needless to say, the process was changed to truncate tables after exporting/extracting required
data first, and then loading the data back. Worked much better.

Similar Messages

  • SELECT statement takes long time

    Hi All,
    In the following code, if the T_QMIH-EQUNR contains blank or space values ,SELECT statement takes longer time to acess the data from OBJK table. If it T_QMIH-EQUNR contains values other than blank, performance is good and it fetches data very fast.
    Already we have indexes for EQUNR in OBJK table.
    Only for blank entries , it takes much time.Can anybody tell why it behaves for balnk entries?
    if not T_QMIH[] IS INITIAL.
            SORT T_QMIH BY EQUNR.
            REFRESH T_OBJK.
            SELECT EQUNR OBKNR
              FROM OBJK INTO TABLE T_OBJK
              FOR ALL ENTRIES IN T_QMIH
              WHERE OBJK~TASER = 'SER01' AND
             OBJK~EQUNR = T_QMIH-EQUNR.
    Thanks
    Ajay

    Hi
    You can use the field QMIH-QMNUM with OBJK-IHNUM
    in QMIH table, EQUNR is not primary key, it will have multiple entries
    so to improve the performance use one dummy internal table for QMIH  and sort it on EQUNR
    delete adjacent duplicates from d_qmih and use the same in for all entries
    this will improve the performance.
    Also use the fields in sequence of the index and primary keys also in select
    if not T_QMIH[] IS INITIAL.
    SORT T_QMIH BY EQUNR.
    REFRESH T_OBJK.
    SELECT EQUNR OBKNR
    FROM OBJK INTO TABLE T_OBJK
    FOR ALL ENTRIES IN T_QMIH
    WHERE  IHNUM =  T_QMIH-QMNUM
    OBJK~TASER = 'SER01' AND
    OBJK~EQUNR = T_QMIH-EQUNR.
    try this and let me know
    regards
    Shiva

  • Replication update statement takes long time

    Hi Replication experts,
    I have a issue and please suggest if my understanding and solution is correct.
    We have a transactional replication setup for data warehouse, from today morning replication got huge latency so when I looked into it I saw the "sp_MSupd_< tablename >" was running for very long time and by this time it was running for 9 hours
    still no data was updated, Latency went very high. What we feel is that the index maintenance was not done in subscriber also it was not replicated too. So due to high fragmentation the update statement could take very long.
    As there was no error message or blocks found all we see is the update taking very long. So to avoid this we are planning to remove the index, as this is just data warehouse index maintenance is not required by removing we can gain some space too. Is this a
    good Idea to implement?
    When we ran profiler nothing was found, no error or alert logged.
    Please let me know your suggestions
    Thanks
    Best Regards Moug

    Hi All,
    The Issue we found to be is that a day before, new column was added to the table and 9000 rows were updated ... This caused the distributor to slow down the update operation as the index in subscriber(15 million rows) was updating every time  a row
    is updated.. So we suspect that adding a new column and updating it at the same time is the culprit..
    But still am not convinced as per my understanding the distributor operates by comparing the primary key of publisher that was changed with the primary key of the subscriber and apply those change.. If that is the case why should it worry about the new column
    added or the number of updates..
    Also one strange thing is another table was also lagging behind in its operation ,though that table was updated with just 18 rows.. So in a nutshell the update operation was totally down by distributor operation on that day..
    Can someone please shed some light on this, Replication is my favorite topic but now I got fear of it.. after failing to know what could be issue... 
    Best Regards Moug

  • Update statement takes long time - Why so ?

    Dear DBAs;
    Daily update statement takes 20 mins. But today update takes more time.
    What is the reason how to resolve ?
    Thanks in advance ..

    8f953842-815b-4d8c-833d-f2a3dd51e602 wrote:
    Dear DBAs;
    Daily update statement takes 20 mins. But today update takes more time.
    What is the reason how to resolve ?
    Thanks in advance ..
    More time? How much more?

  • Delete Statement taking long time

    Can anyone help for the below query:
    DELETE FROM apm_prod_mst_interface
         WHERE plant_code= 'CAPL'
    AND trunc(start_date) = '20-FEB-2008'
    AND shift = p_mb_details.shift
    AND formula_class = p_mb_details.formula_class
    AND item_no = p_batch_details.item_no
    AND line_no = p_mb_details.line_no
    AND nvl(formula_no,'1') = NVL('ASCC1','1')
    AND nvl(formula_vers,-1) = NVL(13,-1)
    AND uom = 'KG'
    AND NVL(routing_no,'-1') = NVL('SFSDF-2','-1')
    AND NVL(routing_vers,0) = NVL(14,0)
    AND NVL(plan_start_date,trunc(sysdate)) = NVL('20-FEB-2008',trunc(sysdate))
    AND NVL(expct_cmplt_date,trunc(sysdate)) = NVL('20-FEB-2008',trunc(sysdate))
    AND user_name = 'DUMMY'
    AND schedule = 2
    AND plan_qty > 0;
    Regards

    Check the High Water Mark of the table!
    If the table has lots of inserts & deletes all the time, the HWM may be 1000 miles away from the actual data (But Orcale will need to read all the blocks to determine if they are empty).
    Has the table been analyzed recently?
    Explain plan for the equivalent SELECT?
    IF you have index'es on all the fields, then an update will take time, since it has to update 15-20 indexes.
    I would:
    1) Try to time just the SELECT (explain plan & autotrace)
    2) Gather stats
    3) SELECT again - and see if difference?
    4) If not -> ALTER TABLE <name> MOVE (to fix HWM)
    5) SELECT again
    best regards
    Mette

  • DELETE query takes long time more than 30 min

    Hi
    I have delete query as below.It takes 1300 sec to execute .Please let me know how to reduce the time of execution.I have indexes on both the columns jdoid,jdoversion of deletion.
    DELETE FROM SIT7016.DEVICEINTERFACE WHERE JDOID = :1 AND JDOVERSION = :2
    Regards
    Pandu

    udnapp wrote:
    I have delete query as below.It takes 1300 sec to execute .Please let me know how to reduce the time of execution.I have indexes on both the columns jdoid,jdoversion of deletion.
    DELETE FROM SIT7016.DEVICEINTERFACE WHERE JDOID = :1 AND JDOVERSION = :2Pretty meaningless information without an the execution plan.

  • Delete Index in Process Chain Takes long time after SAP BI 7.0 SP 27

    After upgrading to SAP BI 7.0 SP 27 Delete index Process & Create index process in Process chain takes long time.
    For example : Delete index for 0SD_C03 takes around 55 minutes.
    Before SP upgrade it takes around 2 minutes to delete index from 0SD_C03.
    Regards
    Madhu P Menon

    Hi,
    Normally  index  creation or deletion can take long time in case  your database statistics are not updated properly, so can check  stat  after your data loading is completed and index generation is done,  Do creation of database statistics.
    Then try to recheck ...
    Regards,
    Satya

  • BPM Process chain takes long time to process

    We have BI7, Netweaver 2004s on Oracle and SUN Solaris
    There is a process chain (BPM) which pulls data from the CRM system into BW. The scheduled time to run this chain is 0034 hrs. This chain should ideally complete before / around 0830 Hrs. <b>Now the problem is that every alternate day this chain behaves normally and gets completed well before 0830 hrs but every alternate day this chain fails…</b> there are almost 40 chains running daily. Some are event triggered (dependent with each other) or some run in parallel. In this, (BPM) process chain, usually there are 5 requests with 3 Delta and 2 full uploads (Master Data). The delta uploads finishes in 30 minutes without any issues with very few record transfers. The first full upload is from 0034 hrs to approximately 0130 hrs and the 2nd upload is from 0130 hrs to 0230 hrs. Now if the 1st upload gets delayed then the people who are initiating these chains, stop the 2nd full upload and continue it after all the process chains are completed. Now this entire BPM process chain sometimes takes 17 -18 hrs to complete!!!!!
    No other loads in CRM or BW when these process chains are running
    CRM has background jobs to push IDOCS to BW which run every 2 minutes which runs successfully
    Yesterday this chain got completed successfully (well within stipulated time) with over 33,00,000 records transferred but sometimes it has failed to transfer even 12,00,000 records!!
    Attaching a zip file, please refer the “21 to 26 Analysis screen shot.doc” from the zip file
    Within the zip file, attaching “Normal timings of daily process chains.xls” – the name explains it….
    Also within the zip file refer “BPM Infoprovider and data source screen shot.doc” please refer this file as the infopackage (page 2) which was used in the process chain is not displayed later on in page number 6 BUT CHAIN GOT SUCESSFULLY COMPLETED
    We have analyzed:--
    1)     The PSA data for BPM process chain for past few days
    2)     The info providers for BPM process chain for past few days
    3)     The ODS entries for BPM process chain for past few days
    4)     The point of failure of BPM process chain for past few days
    5)     The overall performance of all the process chains for past few days
    6)     The number of requests in BW for this process chain
    7)     The load on CRM system for past few days when this process chain ran on BW system
    As per our analysis, there are couple of things which can be fixed in the BW system:--
    1)     The partner agreement (transaction WE20) defined for the partner LS/BP3CLNT475 mentions both message types RSSEND and RSINFO: -- collect IDOCs and pack size = 1 Since the pack size = 1 will generate 1 TRFC call per IDOC, it should be changed to 10 so that less number of TRFCs will be generated thus less overhead for the BW server resulting in the increase in performance
    2)     In the definition of destination for the concerned RFC in BW (SM59), the “Technical Setting” tab says the “Load balancing” option = “No”. We are planning to make it “Yes”
    But we believe that though these changes will bring some increase in performance, this is not the root cause of the abnormal behavior of this chain as this chain runs successfully on every alternate day with approximately the same amount of load in it.
    I was not able to attach the many screen shots or the info which I had gathered during my analysis. Please advice how do I attach these files
    Best Regards,

    Hi,
    Normally  index  creation or deletion can take long time in case  your database statistics are not updated properly, so can check  stat  after your data loading is completed and index generation is done,  Do creation of database statistics.
    Then try to recheck ...
    Regards,
    Satya

  • The 0co_om_opa_6 ip in the process chains takes long time to run

    Hi experts,
    The 0co_om_opa_6 ip in the process chains takes long time to run around 5 hours in production
    I have checked the note 382329,
    -> where the indexes 1 and 4 are active
    -> index 4 was not "Index does not exist in database system ORACLE"- i have assgined to " Indexes on all database systems and ran the delta load in development system, but guess there are not much data in dev it took 2-1/2 hrs to run as it was taking earlier. so didnt find much differnce in performance.
    As per the note Note 549552 - CO line item extractors: performance, i have checked in the table BWOM_SETTINGS these are the settings that are there in the ECC system.
    -> OLTPSOURCE -  is blank
       PARAM_NAME - OBJSELSIZE
       PARAM_VALUE- is blank
    -> OLTPSOURCE - is blank
       PARAM_NAME - NOTSSELECT
       PARAM_VALUE- is blank
    -> OLTPSOURCE- 0CO_OM_OPA_6
       PARAM_NAME - NOBLOCKING
       PARAM_VALUE- is blank.
    Could you please check if any other settings needs to be done .
    Also for the IP there is selction criteris for FISCALYEAR/PERIOD from 2004-2099, also an inti is done for the same period as a result it becoming difficult for me to load for a single year.
    Please suggest.

    The problem was the index 4 was not active in the database level..it was recommended by the SAP team to activate it in se14..however while doing so we face few issues se14 is a very sensitive transaction should be handled carefully ... it should be activate not created.
    The OBJSELSIZE in the table BWOM_SETTINGS has to be Marked 'X' to improve the quality as well as the indexe 4 should be activate at the abap level i.e in the table COEP -> INDEXES-> INDEX 4 -> Select the  u201Cindex on all database systemu201D in place of u201CNo database indexu201D, once it is activated in the table abap level you can activate the same indexes in the database level.
    Be very carefull while you execute it in se14 best is to use db02 to do the same , basis tend to make less mistake there.
    Thanks Hope this helps ..

  • It takes long time to load the parameter's value when running we run report

    Hi,
    It takes long time to load the parameter's value when running we run report. What could cause this? How to troubleshoot the behavior of the report? Could I use Profile and what events should i select?
    Thanks

    Hi jori5,
    Based on my understanding, after changing the parameter, the report render very slow, right?
    In Reporting Service, the total time to generate a report include TimeDataRetreval, TimeProcessing and TimeRendering. To analyze which section take much time, we can check the table Executionlog3 in the ReportServer database. For more information, please
    refer to this article:
    More tips to improve performance of SSRS reports.
    In your scenario, since you mention the query spends less time, the delay might happens during report processing and report rendering section. So you should check Executionlog3 to check which section costs most of time, then you can refer to this article
    to optimize your report:
    Troubleshooting Reports: Report Performance.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • NAC Agent takes long time to run

    Cisco NAC agent takes long time to popup or run on Windows 7 machine.
    The client machine is windows 7, running nac agent 4.9.0.42, against ISE 1.1.1
    Any ideas how to reduce NAC Agent timing?

    Hi Tariq,
    I'm facing the same issue with ISE 1.1.1 (268) with Agent 4.9.0.47 for Windows XP clients. I have already configured "yes" to disabled the l3 swiss delay and reduced the httpa discovery timer from 30 to 05 sec but still clients get aprox 2.30 minutes to popup and finished the posture discovery.
    Can you please advise if this is the minimum time or what is the minimum time and what are the parameters to set to a minimum time to complete agent popup and posture discovery..?
    Is there any option that we can run this on backgroup..?
    thanks in advance..

  • Oracle9i reports take longer time while running in web

    Hi,
    I have developed few reports in Oracle9i and I am trying to run the reports in web. Running a report through report builder takes lesser time compare to running the same report in web using web.show_document. This also depends on the file size. If my report file size(.jsp file) is less than 100KB then it takes 1 minute to show the parameter form and another 1 minute to show the report output. If my file size is around 190KB then the system takes atleast 15 minutes to show the parameter form. Another 10 to 15 minutes to show the report output. I don't understand why the system takes long time to show the parameter form.
    I have a similar problem while opening the file in reports builder also. If my file size is more than 150KB then it takes more than 15 minutes to open the file.
    Could anyone please help me on this.
    Thanks, Radha

    This problem exists only with .jsp reports. I saved the reports in .rdf format and they run faster on web now. Opening a .jsp report takes longer time(file with 600KB takes atleast 2 hours) but the same report in .rdf format takes few seconds to get opened in reports builder.

  • Auto message  restart job take long time to run

    Dear all,
    I have configre the auto message restart job in sdoe_bg_job_monitor
    but it take long time to run.
    i have execute the report i have find out that it is faching records from smmw_msg_hdr .
    in the table present 67 laks records are there.
    actually it is taking a lot of time while getting data from the table
    is there any report or tcode for clearing data in the table.
    I need ur valiuble help to resolve the issue.
    Regards
    lakshman balanagu

    HI,
    If you are using oracle database you may need to run table statistics report (RSOANARA) to update the index. The system admin should be able to this.
    Regards,
    Vikas
    Edited by: Vikas Lamba on Aug 3, 2010 1:20 PM

  • What could be the reason for Crawl process to take long time or get in to a hung state.

    Hi All,
    What could be the reason for Crawl process to take long time or get in to a hung state? Is it something also related to the DB Server resources crunch? Does this lead to Index file corruption?
    What should be the process to be followed when index file is corrupted? How do we come to know about that?
    Thanks in Advance.

    "The crawl time depends on what you are crawling -- the number of items, the size of the items, the location of the items. If you have a lot of content that needs to be crawled, it will take much time".
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/f4cad578-f3bc-4822-b660-47ad27ce094a/sharepoint-2007-crawl-taking-long-time-to-complete?forum=sharepointgeneralprevious
    "The only clean and recommended way to recover from an index corruption is to completely rebuild the index on all the servers in the farm."
    http://blogs.technet.com/b/victorbutuza/archive/2008/11/11/event-id-4138-an-index-corruption-was-detected-in-component-shadowmerge-in-catalog-portal-content.aspx
    Whenever search index file got corrupted it will got the details to Event logs
    http://technet.microsoft.com/en-us/library/ff468695%28v=office.14%29.aspx
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Payables Account Analysis report takes long time to produce xml output

    Hi,
    I am trying to get xml data for the Payables Account Analysis report. I have changed the output format of the concurrent program to XML.
    The report takes long time to produce the xml data irrespective of the number of rows fetched. But the same report with Text output runs very fast.
    Any reason why the xml output takes long time?
    thanks in advance
    Malathi.

    Hi,
    Thanks for the reply.
    As mentioned above, i deleted the Q_FLEXDATA and ran the report. it takes less time.
    But Will the report data not affected when we delete Q_FLEXDATA Group? and Why this flexdata group affects the running time?
    Thanks,
    Malathi.

Maybe you are looking for

  • Mac - Iphoto using Adobe Elements 9 to edit

    I recently bought a Mac.  I want to use IPhoto to pull my photos off the camera and to organize.  The preference for Editing is Photoshop Elements 9.  When I click on Edit in Iphoto, the Elements Welcome Screen appears and it then starts churning awa

  • Javax.servlet.ServletException: /opt/CSCOar/lib/libarapi.so: libstdc++.so.6

    Hi all, I faced the following issues while calling the JNI library from Struts Action Class. Initially got the following exception - java.lang.UnsatisfiedLinkError: no arapi in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1

  • Is there a way to store mp4 video files on iCloud that can be read by either QuickTime or ITunes?

    Is there a way to store mp4 videos in iCloud so that they can be accessed by my IPad using Itunes or QuickTime.  I'd like to travel with only my IPad. Many Thanks

  • Adobe GoLive Cs2 locking up

    Not getting any replies on the Adobe forum, thought Id try here... so I have a website project up and needed to change something on one page. I tried to open the "pages folder" and it locks up. (I get the spinning beach ball) I force closed it and re

  • Openscript warning "No repository path found"

    Hi While executing a script, OpenScript is throwing a warning on the console : WARN  [JwgRepositoryService] No repository path found, using default. repository=C:\Users\assasidh.ORADEV\Desktop How can we get rid of this warning ? This is the content