question

ovi_shiv avatar image
ovi_shiv asked

Sql Server Current Executing Report - Status Suspended, Wait Type - PAGEIOLATCH_EX, Command - KILLED/ROLLBACK

Actually I am updating a table with CTE and my table has 300 Million records. My query is terminated after 4 hours of running. And now I am not able do any thing on that table like select, update any operations.

Below my sample query

with TableWithID as ( select vb.ID vid, vb.State_Code, eh.stateid, eh.id, eh.NId , Upper(vb.abbr_sname) + cast(row_number() OVER(Partition BY eh.StateId order by eh.Stateid) as nvarchar) as rnk from vb_electors_28 eh, vb_sites vb where vb.State_code=eh.StateId and vb.Id!=5 ) update TableWithID set NId = rnk

Please help..

sql server 2014
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered

Rolling back a transaction is single threaded, so could take longer than the query had originally run before it was killed. Try running

kill [yourspid] with statusonly 

to see how long SQL estimates you will have to wait

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.