Solved

update clob column with varchar column

Posted on 2010-08-12
6
1,173 Views
Last Modified: 2013-12-19
I added a new column to the existing table (clob column) and i wanted to move the existing data from varchar column to the newly added  clob column. ( The size for the existing varchar is not enough and I don't want to remove that column so i didn't do alter table to change the data type)

UPDATE  schedule_ table
         SET   condition_large_sql = to_clob(condition_sql);

commit;


This statement is running for ever.

The table has 360 records.


Plan
UPDATE STATEMENT  ALL_ROWSCost: 3  Bytes: 292  Cardinality: 4              
      2 UPDATE SCHEDULE_TABLE       
            1 TABLE ACCESS FULL TABLE NEMA.CR_REPORT_SCHEDULE Cost: 3  Bytes: 292  Cardinality: 4  


0
Comment
Question by:vishali_vishu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 33421411
you should be able to assign the record directly

UPDATE  schedule_ table
         SET   condition_large_sql = condition_sql;
0
 
LVL 1

Author Comment

by:vishali_vishu
ID: 33422094
it is running forever.
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 168 total points
ID: 33422169
are multiple people updating that table?

your update doesn't have a where clause,  if just one other person is updating just one row you will have to wait until that transaction completes.

if you have multiple people and multiple rows it just gets that much worse
0
 
LVL 6

Assisted Solution

by:sridharv9
sridharv9 earned 166 total points
ID: 33424906
We do run similar sql moving varchar to clob using bind variables.

UPDATE streaminfo SET strm_tag1 = '' , strm_lob_tag2 = :1  WHERE stream_ID=:2

Check if the "enq-HW: contention"  wait event is high. And if yes try  manually add extend to lob segment.

However, still you may see slowdown of overall system performance. Oracle so far couldn't give us any appropriate answer.  

 Good luck.
0
 
LVL 13

Assisted Solution

by:riazpk
riazpk earned 166 total points
ID: 33452025
Try to lock the table before issuing update:
LOCK table schedule_ table in exclusive mode;
and you will know whether any record has been locked by someone else or not.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question