Solved

update clob column with varchar column

Posted on 2010-08-12
6
1,170 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle SQL - Query help 7 79
Sybase and replication server 13 58
Create file system directory from Oracle 10g 4 32
sum of columns in a row in oracle 3 42
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

749 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