this is a weird one
I have a simple query like
select studentnum from matbrdoff
set active = 'Y', grade = '9', schoolcode = 'BMH', homeroom = '9/10', dept = '107371691'
where studentnum = 60795 and schoolcode = 'BMH'
and they take 4hr + so i started off shrinking log file since i had an error 'more that 1000 VLF file' that di no good so then I adjusted
ALTER DATABASE matbrdoff
modify FILE (name=matbrdoff_log
, size=4096 mb
, filegrowth=1024 mb)
no luck profiler gives me this its saying it cant find the db? and these objects in the tuning log ...any ideas
When you are executing the update statement, please check if there are any blockings. You can use the below query to check blockings.
select * from sys.dm_exec_requests where blocking_session_id > 0
You can also use sp_who and check the blk column to see if there are any blockings.
Create an Index on the students table with studentnum and schoolcode as the key columns.
Thanks and Regards Alankar Chakravorty
I get the beolw response so does that mean these 2 are blocking?
session_id request_id start_time status command sql_handle statement_start_offset statement_end_offset plan_handle database_id user_id connection_id
58 0 2013-11-06 11:16:21.360 suspended UPDATE 0x020000004F1ED334DD92D78A0712BD23CA2CC94461B75AC4 206 572 0x060001004F1ED3344081BB4E050000000000000000000000 1 1 E7815323-CFBE-4F25-B231-6C978CF05A88
59 0 2013-11-06 11:03:38.080 suspended UPDATE 0x02000000397DAE0BC347FBFF2CBEFD376901EA7F525D448C 0 -1 0x0600D601397DAE0B4001A44E050000000000000000000000 470 7 C152F41C-0E9D-4DEB-90EA-DB9DE157FFCD