Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proccessor goes 100% Deleting rows 1

Status
Not open for further replies.

tommyspain

Technical User
Jan 26, 2003
6
0
0
ES
Hi all:

I made a stored procedure as recomended to delete thousands of rows but, why is proccessor burning at 100%? and, how can I monitor it to know what is it doing?

This is the procedure fired from a job in Server Manager:

CREATE PROCEDURE deletingStat AS

Declare @rc int
Select @rc=100

while @rc=100
Begin
Begin Transaction
DELETE FROM statLiberando
Select @rc=@@rowcount
Commit
End
GO
 
Why not just truncate the table if deleting ALL the records within?

Code:
truncate table statLiberando
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top