Click here to Skip to main content
15,890,372 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi friends,

I have a table called grn_items and i am trying to execute simple update query .

update grn_items set uid=1;


It has total 823 rows and i need to update a uid column.

But it is taking lot of time to update(more than 20min).

Can anyone help me out.
Posted
Comments
George Jonsson 9-Jul-14 6:49am    
That can't be all your code.
PRAKASH_N 9-Jul-14 6:51am    
Is there any log file issues??
Bernhard Hiller 10-Jul-14 2:46am    
Any triggers on grn_items?
How is the "uid" column defined?
PRAKASH_N 10-Jul-14 6:10am    
yes... on update trigger

1 solution

"update grn_items set uid=1;"
and
"yes... on update trigger "
=> see it? The problem is caused by your trigger (and maybe further nested therein).
 
Share this answer
 
Comments
PRAKASH_N 10-Jul-14 22:33pm    
yes... It became nesting the trigger i mean looping same trigger again and again.

Now i solved this issue by writing separate stored procedure with Cursor. It taking only 2.0930 sec to update 800 records..

Thank you Bernhard Hiller

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900