Groups | Blog | Home
all groups > sql server (microsoft) > february 2007 >

sql server (microsoft) : sql update issue


Jason
2/12/2007 2:03:38 PM
I have an update query that I'm trying to run. Basically I start by
build three temp tables and running a fourth query that is an update
on the FOLDERSDOC table based on conditions in the temp tables.

After this first update query is run, two more temp tables are built
and a second update query is ran on the FOLDERS table.

When I first built the update query and ran it on my development SQL
Server, the update would run and run; finally failing. Out of
circumstance, I dropped the FOLDERSDOC table and re-imported it from
production, and my update query correctly ran in 3 seconds.

The same circumstance is true with the FOLDERS table update query. I
dropped it, and re-imported the table, and my second UPDATE ran just
fine in my development server.


I'm trying to run these queries in production again, and the update
queries are running indefinitely. I'm considering dropping the
FOLDERS and FOLDERSDOC table, but I hesitate doing this on a
production database server. Does anyone have any suggestions?
Steve
2/12/2007 4:02:07 PM
[quoted text, click to view]



Books Online topics for locking/blocking:
sys.syslockinfo (Transact-SQL)
sp_who (Transact-SQL)
sp_who2 (Transact-SQL)
sp_lock (Transact-SQL

Sometimes table variables work better that temp tables...many posts on
this subject.
AddThis Social Bookmark Button