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?
Similar Messages
-
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 MougHi 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 -
Why update query takes long time ?
Hello everyone;
My update query takes long time. In emp ( self testing) just having 2 records.
when i issue update query , it takes long time;
SQL> select * from emp;
EID ENAME EQUAL ESALARY ECITY EPERK ECONTACT_NO
2 rose mca 22000 calacutta 9999999999
1 sona msc 17280 pune 9999999999
Elapsed: 00:00:00.05
SQL> update emp set esalary=12000 where eid='1';
update emp set esalary=12000 where eid='1'
* ERROR at line 1:
ORA-01013: user requested cancel of current operation
Elapsed: 00:01:11.72
SQL> update emp set esalary=15000;
update emp set esalary=15000
* ERROR at line 1:
ORA-01013: user requested cancel of current operation
Elapsed: 00:02:22.27Hi BCV;
Thanks for your reply but it doesn't provide output, please see this.
SQL> update emp set esalary=15000;
........... Lock already occured.
>> trying to trace >>
SQL> select HOLDING_SESSION from dba_blockers;
HOLDING_SESSION
144
SQL> select sid , username, event from v$session where username='HR';
SID USERNAME EVENT
144 HR SQL*Net message from client
151 HR enq: TX - row lock contention
159 HR SQL*Net message from client
>> It does n 't provide clear output about transaction lock >>
SQL> SELECT username, v$lock.SID, TRUNC (id1 / POWER (2, 16)) rbs,
2 BITAND (id1, TO_NUMBER ('ffff', 'xxxx')) + 0 slot, id2 seq, lmode,
3 request
4 FROM v$lock, v$session
5 WHERE v$lock.TYPE = 'TX'
6 AND v$lock.SID = v$session.SID
7 AND v$session.username = USER;
no rows selected
SQL> select MACHINE from v$session where sid = :sid;
SP2-0552: Bind variable "SID" not declared. -
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
AjayHi
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 -
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
ThanksDeleting 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. -
Update statement taking long time
Hi All,
The following query is taking too much time for update the 100000 records.
Please tell me how can this query time get reduced.
DECLARE
CURSOR cur IS
SELECT c.account_id FROM crm_statement_fulfilled_sid c;
BEGIN
FOR i IN cur LOOP
UPDATE crm_statement_fulfilled_sid a
SET a.rewards_expired = (SELECT abs(nvl(SUM(t.VALUE), 0))
FROM crm_reward_txns t
WHERE txn_date BETWEEN
(SELECT (decode(MAX(csf.procg_date) + 1,
NULL,
to_date('01-May-2011',
'DD-MM-YYYY'),
MAX(csf.procg_date) + 1))
FROM crm_statement_fulfilled csf
WHERE csf.procg_date < '01-aug-2012'
AND account_id = i.account_id) /*points_start_date_in*/
AND '01-aug-2012'
AND reason = 'RE'
AND t.account_id = i.account_id);
END LOOP;
END;Any help?
SidHoek wrote:
Second: you're doing row-by-row (= slow-by-slow) processing.
See if you can rewrite your code into a single SQL UPDATE statement that will process an entire SET at once.Well to be nitpicking. The op already does a single big update. He just does it again and again and again for each account id. Each time completely overwriting the values from the last account id. -
Why it takes long time to shut down after i upgrade to OS X ver 10.8.2?
why it takes long time to shut down after i upgrade to OS X ver 10.8.2?
Can't really say, but I see this occurring on all of my Macs since the 10.8.2 update and keep reading about it at several other Mac user boards.
Bottom line: it's a general problem, but more of an inconvenience, than a serious problem. Probably will be solved with the next update. -
Why it takes long time to download and udates for iphone4
why it takes long time to download and updates for iphone4 ?
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Why do you need this if you are going to Oracle. Try
removing this. It might be trying things out with the
old driver and then moving to the new driver. This has nothing to do with it. (And it doesn't "try things out")
>
Also check your machines. They might be slow. There is
no reason, it should take more than few hundred
milliseconds to connect to a database on localhost as
your case is.Possible reasons...
- Network traffic
- Faulty router/gateway
- Busy server
- Faulty network card (either end)
- Conflict with another box -
Hello .. I've been subscribed for ic;oud for 20$ per year and I found it useless for many reasons: that I can not disconnect my mobile while the uploading process and it takes long time for uploading my data .. Its not a reliable system that's why I need to deactivate the space service and take my money back .. Thanks
The "issues" you've raised are nothing to do with the iCloud service.
No service that uploads data allows you to disconnect the device you are uploading from while uploading data. Doing so would prevent the upload from completing. It is a basic requirement for any uploading service that you remain connected to it for uploading to be possible.
The time it takes to upload data to iCloud is entirely dependent on how fast your Internet connection is, and how much data you are uploading. Both of these things are completely out of Apple's control. Whichever upload service you use will be affected by the speed of your Internet connection. -
Why outlook2011 mac version* takes long time to boot with OSX
why outlook2011 mac version* takes long time to boot with OSX
Okay, so after doing all of the above, the computer still takes between 40 seconds and 1 minute or so to boot up, and the VersionCue messages still appear. However I discovered that the "kdcmond cannot retrieve..." messages disappeared after I disabled my ethernet connections. So at least I know that that had nothing to do with the extended boot-up time.
I have heard that the more RAM you have, the longer it takes to boot due to the RAM count. Since I have 10 GB, maybe this is why?
I've included the most recent Console messages below:
22/4/08 9:56:16 AM com.apple.launchctl.System[2] launchctl: Please convert the following to launchd: /etc/mach_init.d/dashboardadvisoryd.plist
22/4/08 9:56:16 AM com.apple.launchd[1] (com.adobe.versioncueCS3) Unknown key: ServiceDescription
22/4/08 9:56:16 AM com.apple.launchd[1] (org.cups.cups-lpd) Unknown key: SHAuthorizationRight
22/4/08 9:56:16 AM com.apple.launchd[1] (org.cups.cupsd) Unknown key: SHAuthorizationRight
22/4/08 9:56:16 AM com.apple.launchd[1] (org.ntp.ntpd) Unknown key: SHAuthorizationRight
22/4/08 9:56:39 AM com.apple.SystemStarter[28] Starting Aladdin USB daemon
22/4/08 9:56:39 AM org.ntp.ntpd[25] Error : nodename nor servname provided, or not known
22/4/08 9:56:39 AM com.apple.launchd[1] (com.apple.UserEventAgent-LoginWindow[74]) Exited: Terminated
22/4/08 9:56:39 AM com.apple.launchctl.Aqua[90] launchctl: Please convert the following to launchd: /etc/machinit_peruser.d/com.adobe.versioncueCS3.monitor.plist
22/4/08 9:56:42 AM com.apple.launchd[82] (0x1011e0.VersionCueCS3monitor) Failed to check-in! -
Why it takes long time (about 10 Min) to map the network drivers in windows 8.1? I don’t have this problem with any other operating systems (Ex: Windows 7 or XP)
Can you perform a refresh ?
Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
the thread. -
Why it takes long time to establish Database Connection ???
Can any one please have a look on the following code snippet and show me which mistake I'm doing so it take long time to connect to DB(more than 5 minutes !!!!)
Thanx in advance ...
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Class.forName("oracle.jdbc.driver.OracleDriver");
String dbString2 = "jdbc:oracle:thin:@" + "127.0.0.1" + ":" + "1521" + ":" + "nat";
aCon = DriverManager.getConnection(dbString2, "scott", "tiger");
stmt = aCon.createStatement();
System.out.println("Connection to DB Established");
catch (ClassNotFoundException cnfe)
System.out.println("Class not found:");
cnfe.printStackTrace();
catch (SQLException sqle)
System.out.println("SQL Exception: " + sqle.toString());
sqle.printStackTrace();Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Why do you need this if you are going to Oracle. Try
removing this. It might be trying things out with the
old driver and then moving to the new driver. This has nothing to do with it. (And it doesn't "try things out")
>
Also check your machines. They might be slow. There is
no reason, it should take more than few hundred
milliseconds to connect to a database on localhost as
your case is.Possible reasons...
- Network traffic
- Faulty router/gateway
- Busy server
- Faulty network card (either end)
- Conflict with another box -
When I use update software from my mobile it take long time for checking update software and no thing happened to update my IOS software
Servers have been swamped. Keep trying and be patient. Wait a few days.
-
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 -
Why the LMS topology Service takes long time to reflect the device availability status?
In the topology services map, the color status of the router takes long time to move from red to green and vice versa.
i have already configured the time interval in the fault monitor poller setting to 6minutes but the only thing reflected the little mark at the top of the icon itself. anyhow the topology service still believe that the devices are unreachable. i have waited almost 45 minutes and nothing happened.
please let me known the trick to make the topology services act more quicker .
Sent from Cisco Technical Support iPhone AppTopology Services isn't really designed to be a near real time network device up/down tool. It will an change icon's status as a result an ANI engine polling cycle or an admin operator-initiated manual device rediscovery. While you can increase the frequency of polling cycles, that's not usually such a good idea as you could make the server be polling constantly and never completing a job.
To ascertain near real time fault status one should refer to the Fault Dashboard.
Maybe you are looking for
-
Airport Ext. Port Forwarding does not work
I am trying to open up UDP ports 500, 1701, and 4500 to point to my local computer since i'm using iVPN. However, Airport doesn't seem to want to open these up. I disabled Mobile Me as per the support document I found and still having issues. I want
-
Error message when trying to open a newly installed Adobe Reader from Old Software reinstalled
I am unable to open my Adobe Acrobat Professional 7 that came with Adobe CS2. There is an error message that says "No valid Acrobat Serial Number found. Acrobat will now quit." There is no area to input the serial number even though I have it on the
-
"Itunes has detected an iPod that appears to be corrupted" - Ipod Classic
I recently noticed little tiny jumps or skips appearing in songs on my 80GB ipod classic, so decided to restore it. Having done this I got the following message: "Itunes has detected an iPod that appears to be corrupted. You may need to restore this
-
Discount based on partner function
Hello, A customer 2000 generates an order with his normal role of Sold to Part, Ship to Part, Bill to Party & Payer. A Partner function called special stock partner is also assigned to that customer which in itself is another customer 3000. If the cu
-
Translation of adopeforms used in webdynpro ABAP
Hi Experts, I'm using adopeform th'gh webdynpro application. I need to output the form in french language. how can it be done??. I have already tested with se63 transaction but its not getting translated in the webpage . Kindly give a solution. Kindl