Try update using rowid and cursor, update might be faster
declare
CURSOR Cur_Rowid IS
SELECT rowid
FROM customer
WHERE ....
Begin
OPEN Cur_Rowid;
LOOP
FETCH Cur_Rowid INTO v_rowid;
EXIT WHEN Cur_Rowid%NOTFOUND;
UPDATE .. .. WHERE ROWID = v_rowid;
END LOOP;
CLOSE ..
END;
Thanks and Regards,
Sriram
-----Original Message-----
From: TABAKU Dritan
[mailto:oracledba-ezmlmshield-x72787806.[Email address protected]
Sent: Monday, March 31, 2008 5:26 PM
To: LazyDBA Discussion
Subject: RE: Update issue!
The server is remotely
So it is out of our premises.
Unix platform and have good performance.
When I update them in batch around 100 per batch it works fine.
The exact structure of query is:
Begin
For I in ( select id from customers where priority = '1' ) Loop Update
customers set priority = '1' where id = I.id; End loop End;
I have an online module that is not able to see the customers with
priority = 1 When I do this update the online is taking correctly the
value from the DB.
Br
________________________________________
Dritan TABAKU
-----Original Message-----
From: Michael Peel [mailto:[Email address protected]
Sent: Monday, March 31, 2008 1:50 PM
To: TABAKU Dritan
Subject: RE: Update issue!
On what platform and hardware?
This should take seconds, minutes at the most, unless you're
experiencing
locking issues.
Michael Peel
-----Original Message-----
From: TABAKU Dritan [mailto:[Email address protected]
Sent: 31 March 2008 12:46
To: Michael Peel
Subject: RE: Update issue!
About 100000
________________________________________
Dritan TABAKU
BCCS Unit, IT Department
AMC, ALBANIA
mobile:+355 (0) 682053050
e-mail:: [Email address protected]
-----Original Message-----
From: Michael Peel [mailto:[Email address protected]
Sent: Monday, March 31, 2008 1:46 PM
To: TABAKU Dritan
Subject: RE: Update issue!
**A LazyDBA.com subscriber has responded to your lazydba.com post**
**LazyDBA.com mail shield has forwarded you this email,
**and removed any attachments, and kept your email address secret
**from this person, and any viruses/trojans.
**If you reply to this email, the person will see your email address as
normal
**Anything below this line is the original email text
How many rows do you have in your table?
Michael Peel
-----Original Message-----
From: TABAKU Dritan
[Email address protected]
Sent: 31 March 2008 12:41
To: LazyDBA Discussion
Subject: RE: Update issue!
Hello
I run the following, but it takes a lot of time.
How can I perform faster this update?
Br
________________________________________
Dritan TABAKU
BCCS Unit, IT Department
AMC, ALBANIA
mobile:+355 (0) 682053050
e-mail:: [Email address protected]
-----Original Message-----
From: Jagannathan Gowrish
[mailto:oracledba-ezmlmshield-x50104688.[Email address protected]
Sent: Monday, March 31, 2008 12:40 PM
To: LazyDBA Discussion
Subject: RE: Update issue!
Begin
For I in ( select id from customers where id > 10000 )
Loop
Update customers set customer_address = 'null' where id = I.id;
End loop
End;
-----Original Message-----
From: TABAKU Dritan
[mailto:oracledba-ezmlmshield-x13777965.[Email address protected]
Sent: Monday, March 31, 2008 4:05 PM
To: LazyDBA Discussion
Subject: Update issue!
Hello Experts,
I want to update a table with the specific value.
The problem is that I can't update them all 100000 rows.
I want to update them one by one.
Can anyone provide me a script or a solution how can I do it?
Example:
Update customers set customer_address = 'null' where id > 10000
Thanks
________________________________________
Dritan TABAKU
BCCS Unit, IT Department
AMC, ALBANIA
mobile:+355 (0) 682053050
e-mail:: [Email address protected]
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
**********************************************************************
This e-mail is confidential and may be privileged.
It may only be read, copied and used by the intended recipient.
If you have received it in error please contact the sender immediately
by return e-mail. Please then delete the e-mail and any copies of it
and do not use or disclose its contents to any person.
**********************************************************************
Registered Office: Farncombe House, Broadway, Worcestershire, WR12 7LJ
AccuRead Limited Registered Number: 3076187 England
GSL UK Limited Registered Number: 3333860 England
Global Solutions Limited Registered Number: 3189802 England
**********************************************************************
**********************************************************************
This e-mail is confidential and may be privileged.
It may only be read, copied and used by the intended recipient.
If you have received it in error please contact the sender immediately
by return e-mail. Please then delete the e-mail and any copies of it
and do not use or disclose its contents to any person.
**********************************************************************
Registered Office: Farncombe House, Broadway, Worcestershire, WR12 7LJ
AccuRead Limited Registered Number: 3076187 England
GSL UK Limited Registered Number: 3333860 England
Global Solutions Limited Registered Number: 3189802 England
**********************************************************************
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
Oracle LazyDBA home page