The update takes a long time

Hi we have a customer_status of the table where we have the following columns such as contacted_date and status

Under certain conditions, it will read all lines and update the data

as the customer_status UPDATE

SET contacted_date = < some_date >

When status = 0 and contacted_date is set to null

It's taking a long time and have hanged...

Please let me know what I need to check in what concerns the DB from Redolog setting or any other setting that I am basically a developer all

The current version of the DB is:

Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

CUSTOMER_STATUS

CONTACTED_DATE TIMESTAMP

STATUS NVARCHAR (1)

Any suggestions would be much appreciated.

I've seen this kind of problem before and there is no simple answer.  You are better off watching a redesign, otherwise, you will have to resort to brute force tactics to improve performance.  And even then the best you can do is still very limited.

If you have a table "customer_status" with a "status" column that has probably only 2-0 and 1 values.  This means that the optimizer will believe, in the absence of all histograms for each value to roughly half of the rows in the corresponding table.  Think about it, it makes sense.  In turn, that means that the optimizer is more likely to choose a full table scan to run the UPDATE.  In turn, which means that as time passes and the table grows then the update becomes slower and slower every time that it is executed.

Solution?  A redesign.  Really, it's the "best solution".  Otherwise you still go to the fight against the problem that the "Status" column has only 2 values in it and Oracle can assume that half of the lines end with each value.  With these statistics, the optimizer will always choose a full as table scan being the cost lowest and as the table grows so the update is slower.

You can try to create an index on the status and contacted_date on customer_status (status, contacted_date).  But that works only if the "status" has a NOT NULL constraint on it, which does not appear in your column definitions.  Without that the index would be always useless and Oracle would still do a full table scan.

You would also go the questions that your query uses a 0, which is a NUMBER, but the definition of the column is of type NVARCHAR and Oracle will add an implicit conversion around the column to convert number in the execution of the query, which again once stops using the index on two columns.  Data types must match for an index to use.

You could create a histogram of frequencies located on the 'Status' column so that the optimizer has more precise statistics.  But this can depend on when in the day, the table statistics are collected.

These tables tend to be very dynamic with data changing in their breast. How many lines in this table?  Are all deleted?  Or they stay there forever?  How many times does change the status value?  Or it fixed once and stay the same forever?

I've seen problems of treatment of systems with a table of 'work' with a "status" column on work, and depending on what time of the day, statistics were collected from this table, it could have vastly different numbers of lines in there and a different number of lines with different values for the 'status '.  Ultimately we did an overhaul and separate tables used - one for in the expectation of work - and one for completed tasks that kept the data sets smaller and meant that the table 'pending' only pending works in.

John

Tags: Database

Similar Questions

  • Starting the server takes a long time due to the storage of JMS persistence files

    Hello

    We use WebLogic 9.2 on a windows machine.
    Recently, we have improved our request to work with JMS.
    We are on 2 different servers in a cluster using 2 JMS servers and works with distributed destinations.
    We use file storage as our persistence store.

    Recently, we found boot server takes a long time because of the actions that are performed on the storage of files.
    Analysis of this problem, we have seen that the size of the file is of ~ 2 GB.
    We understand that the file size does not fear (unless it is compacted manually), and its size matches the largest number ever of pending messages in the queues (as a mark of high tide).
    We shot also store debugging, using weblogic. Debug.DebugStoreIOPhysical and we saw a lot of recovery after newspapers file storage is open.
    We have checked and checked our JMS transactions are completed successfully. We also checked that the current messages and number of courses is 0.
    We stopped the server gracefully, check that there are no messages pending.
    However, several times takes start server ~ 30 minutes due to heavy work on the persistence store.
    Compaction or remove storage of files eliminates the delay.
    However, we want to avoid the manual operations whenever we want to start the server.

    Please share your ideas.

    Thank you
    Itsik

    The only suggestions I have off the top of my head are:

    * Ensure (1) the host system has at least 2 GB (the store file size) memory physics in addition to the memory used by the current process, and (2) the host system is not rebooted between each restart WebLogic. If you ensure that both of these, then the operating system puts implicitly cached content of the file of the store in memory even between boots - when WebLogic starts subsequently storing files, the o/s should be the content of the file much more quickly.

    * You can move to a JDBC store. Runtime JDBC store performance are lower, but since you have generally has only a small amount of records to retrieve, startup performance should be higher in this case.

    * Not that it helps your case, but it happens that we have significant performance improvements of starting process for a future version (if all goes well a near future release).

    Tom

  • Adobe Acrobat Reader update takes a long time

    Lately, whenever I have trying to update Adobe Acrobat Reader on my MacBook Pro, it says "Installing Update" for a very long time (more than 30 min).  Why it takes so long?

    The normal download for installation of Player isn't final setup, this is a download manager to download the actual installer. Especially on Mac OS X, which doesn't seem to work reliable in all cases. I uninstall Adobe Reader and then start with a new download of the full installer via this link: Adobe - Adobe Acrobat Reader DC Distribution

  • Windows updates takes a long time

    Original title: Windows 8 Pro updated

    Why updates Windows 8 Pro so slow and tedious? I have high speed internet and a Core 2 Duo processor.

    Hi, James R.

    Thanks for posting your query in Microsoft Community.

    In order to help you better, please provide us with the following information:

    (1) you are referring to the installation or the verification of updates?
    (2) have you noticed if there was several updates?

    (3) what anti-virus software do you use?

    If the update is installing, wait until the process is completed and check whether it is successful or fails. Please provide us with more information about the issue so that we can help you best.

    Method 1: run the troubleshooter as suggested in the following article:

    Problems with installing updates

    http://Windows.Microsoft.com/en-us/Windows-8/troubleshoot-problems-installing-updates

    Method 2: perform a clean boot

    Follow this link to clean your computer starts
    How to perform a clean boot for a problem in Windows Vista, Windows 7 or Windows 8

    http://support.Microsoft.com/kb/929135
    Follow the steps in the article, and then run Windows Update.

    For any other help related Windows feel free to contact us.
    Please contact Microsoft Answers.

  • slow library in wmp update takes a long time

    Hello :)

    I formatted my laptop recently and now I'm trying to update my wmp library. I have a very large collection of media, and it takes to always update the library. I wouldn't mind if she were not slow down my laptop performance.

    Is there anyway to speed up?

    Nope, other than to shut out everything else and it ends. He is already underway as soon as possible.  The only thing slowing it down would be other programs that try to run at the same time.

    Best advice: shut down everything, your power settings to "do not SLEEP" and leave on it, for several hours, it can be completed.

  • Save the JPEG, the process takes too long time, how to cut it short?

    Hi all

    I work 8 hours a day using Photoshop CS6 each time come to SAVE JPEG, it ask the quality and I have to select "highest quality 12", I go to the settings to reset, so that my files JPEG is always 12?

    Thank you

    Hi JimmyChelsea,

    Yes, reset default return Photoshop preferences and then open a jpeg file save the image with a high quality 12 and next time when you save any other jpeg, it should show you the quality, worth 12.

    To re-create the Photoshop preferences files, start the application while pressing Ctrl + Alt + Shift (Windows) or command + Option + shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop settings file?"

    Kind regards

    Mohit

  • Select the query takes a long time to run the second time

    Hi all

    I have Oracle 11 GR 1 material in windows server 2008 R2.
    I have a few tables with 10 million documents. When I run the select query to the tables of first time, it gives me a result in 15 seconds, but if I run the script even twice in the same session, I get the result in 15 minutes to complete...

    Why it's happening? What can be the solution for this?

    Thank you and best regards,
    Vikash jain (DBA Junior)

    What I know is that this feedback from cardinality generates more problems than improving the performance is, in fact, its main objective. But first look at which is was written in the link I posted above

    "Return of cardinality was introduced in the Oracle 11 g database 2. The purpose of this function is to automatically improve plans for queries that are executed repeatedly, _For that the optimizer does not estimate the cardinalities in the properly_ plan"

    If the cardinality feedback kiks in your case it is certainly because you do not have an exact statistics. Get the command the explain plans that I have shown you with the E-lines and A-lines (lines estimates and actual lines) and see where things are poorly estimated.

    If you want to disable the cardinality feedback then add the indicator according to your request

    /*+ opt_param('_optimizer_use_feedback','false') */
    

    Best regards

    Mohamed Houri
    www.hourim.WordPress.com

    Published by: Mohamed Houri on November 22, 2012 02:11
    Published by: I was looking for the exact indication of how do I deactivate the cardinality feedback and I foud in an ot the Dominic post in otn :-)

    Published by: Mohamed Houri on November 22, 2012 02:15

  • After paper jam, rolls making noises and the printer takes a long time to spit the copy.

    It is an all in one Officejet Pro 8600 and is still under warranty. How can I get fixed roller?

    Wow!  I found the video on how to find a paper jam!    It was a step that was not included on the instructions of the machines, i.e. check behind the print cartridge and the whereabouts of my paper jam!   When everything has failed, read the instructions, eh?

    Thank you!  My problem is solved!

  • DELETE the query takes a long time

    Hi all guru.

    My Version of DB: 10.2.0
    OS: Windows Server 2003

    I run a delete on a table of paritioned command to remove all the lines in one of the parition. The command is:

    The table name is cat_in_data_052012

    delete CAT_IN_DATA_052012 WHERE name of FILE AS: SYS_B_O


    Table conatins million record.


    Thanks in advance

    >
    I run a delete on a table of paritioned command to remove all the lines in one of the parition. The command is:

    The table name is cat_in_data_052012

    delete CAT_IN_DATA_052012 WHERE name of FILE AS: SYS_B_O
    >
    Mention the name of partition specifically in the query to ensure that only one partition is affected.

    See the example (at the end) for the deletion of rows in a Partition in the SQL reference Guide
    http://docs.Oracle.com/CD/B12037_01/server.101/b10759/statements_8005.htm#i2126857

    Deleting Rows from a Partition: Example
    
    The following example removes rows from partition sales_q1_1998 of the sh.sales table:
    
    DELETE FROM sales PARTITION (sales_q1_1998)
       WHERE amount_sold > 10000;
    
  • XY graph sometimes takes a long time to update legend

    Hello

    I wrote a small piece of code that highlights (changes line width) the plot on the graph when we click a mouse on its name in the legend of the plot. The code works well except when I the legend scroll bar is visible and its position is not 0, then when I click on the name of the parcel, the chart takes a long time(>4s) to change the width of the plot on the legend. The plot on the graph is updated instantly. Its only the legend of the plot that takes a long time to get updated.

    I enclose the code here... Please, run it and see if you also see the same behavior.

    Thank you

    Ritesh

    Hi Ritesh,

    The patch of f2 is already released. http://www.NI.com/download/LabVIEW-development-system-2015/5656/en/

    We will inform you of the R & D of your first question, but unfoturnately we cannot provide information on future products releases.

    Kind regards

  • Windows update takes too long to find the updates

    I had just installed a new hard drive on my laptop Dell inspiron N5050. I did a reinstall of system clean of my operating system to windows 7. After that, I started to run windows update to get all the necessary updates that I need to update completely from the computer. He has worked for a very long time with no result. In addition, at least 2 hours. all the settings for windows update is set to the settings recommended. but for some reason, in my view, takes too long to get updates. can someone help me please this possible issue

    Hello Darrin,

    Thanks for posting your query on the Microsoft Community.

    According to the description, the Windows updates take a long time to find the updates.

    I suggest to follow the methods below and check if that helps.

    Method 1: If your computer is experiencing problems find and install updates of the operating system, try using the troubleshooter.to of update of Windows the problem fix. He makes sure your computer is connected to the Internet and checks to see if your network card and Windows Update services are running properly.

    Reference:

    Open the Windows Update troubleshooting tool

    If the problem persists, try Method 2,

    Method 2: run the clean boot: Place your system in the clean boot state helps determine if third-party applications or startup items are causing the problem. Check this question in the clean boot state.

    Reference: How to perform a clean boot in Windows

    http://support.Microsoft.com/kb/929135

     

    Note: After the boot minimum troubleshooting step, read the sections "How to reset the computer to start as usual after a clean boot troubleshooting" in the link provided to return the computer to a Normal startup mode.

    See also:

    Problems with installing updates

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • Firefox takes a long time to close since a recent update and memory of pigs.

    Since the recent updates that have begun to use containers of plugin, Firefox takes a long time to close. If I try to go back there, he said that it is still running. I have liik in the Manager of tasks and about seven containers plugin. exe is running, and I turned off or disabled mostplugins and addons, same Quicktime. Firefox uses an obscene amount of RAM on my XP machine and rendered sluggish. I use XP SP3. This started after you added the plugin container in one of the recent updates earlier in the year. For the features it offers me or does not offer me, instead, it uses far too much RAM and is too slow. And takes a long time to close when I close the browser. It uses about twice as much RAM as it was.

    Upgrade your Firefox 9 browser and check

  • Update statement takes a long time...

    Hi, I'm below the update statement to update a table, which takes a long time (more than 4 hours).
    The credit of table has records 3crore and temp 22 k table records.
    Is there a better way to write this. A merger may be used?

    Update credit subpartition (pc_2011) pc set pc.principal = (select temp t.principal t where t.pc_id = pc.pc_id);

    Please help me.
    How abt merge...
    
    MERGE into credit SUBPARTITION (pc_2011) pc
                            using temp t
                            On(t.pc_id = pc.pc_id)
                            when matched then update set
                            pc.principal=t.principal
    
    plz post your oracle version...
    
  • The system preference takes a long time to load

    As the title suggests, end of 2013 (10.11.4) System Preferences on my iMac takes a long time to load, even after a fresh reinstall and/or reboot (tried both). It takes about 20 seconds to one minute each time to open (except when I close it and immediately open it once again, as it is always loaded in memory). This problem existed only after the upgrade to El Capitan, and I saw many other people with iMacs with the same problem. I tried to remove cache for before system preferences files, but that did not help at all. I don't have a FileVault if it makes a difference, even if I did before reinstall, but never turned back (persistent question anyway). Any recommendations would be useful. Thank you!

    Data sheet:

    iMac (end 2013)

    Intel Core i5 at 2.7 GHz

    8 GB 1600 MHz DDR3

    1 TB 5400 RPM HARD DRIVE

    Intel Pro Iris 1536 MB

    I found it is the State of affairs in 10.11 if running a HD spinning.  Don't feel alone.

    I suspect that it is a function of low priority in the memory compressed algorithm.

    Upgrading to an SSD and it will rise to attention.

  • Visual Studio 2008 Pro takes a long time to start after the installation of measurement Studio 2009

    After installing Measurement Studio 2009, I noticed that it takes a long time (30-60 seconds) to open a Visual Studio project.

    I do not have an internet connection on my development computer and suspect he might be waiting on some kind of operation of the network to time out.  I had problems with Visual Studio in the past as well and had to work around them by adding entries to my hosts file (to redirect some addresses of Microsoft to the local IP address - this causes network operations to expire immediately).

    Just curious if anyone has encountered this kind of slow startup time and found a solution.

    Thank you!

    I found an article referring to a question similar to MS 8.1.  I don't know if the problem has simply not been corrected or why I am still having this problem.  Workaround "per computer" listed in the article solved my problem.

    http://digital.NI.com/public.nsf/allkb/18E25101F0839C6286256F960061B282 I have

Maybe you are looking for