Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2002-04-23 : 19:50:24
|
| Is there a way to make long running or intense queries not block all other queries from executing?Example:Delete from table where field = @valueLets say my delete statement deletes thousands of rows. Just after I execute that statement, I run a simple select on another table, on a different connection. The select never seems to execute, it usually times out or nearly times out. I want to make sure my simple select finishes in a fairly quick amount of time, and I don't care how long it takes to get the delete (or other intense query completed). How do I not block the simple query? Is this even possible?Michael |
|
|
khalik
Constraint Violating Yak Guru
443 Posts |
Posted - 2002-04-23 : 23:14:55
|
| do u select from same table which u are deletingif so the table should be locked other wise there is no point in getting the data which is to be deleted...if the select is from diff table then the sql server should be fast correct me if am .....======================================Ask to your self before u ask someone |
 |
|
|
aclarke
Posting Yak Master
133 Posts |
Posted - 2002-04-24 : 00:18:07
|
| Hi. Do you have triggers on delete for the table? If so, turn them off. It may also help to disable unused indices on that table during the delete. You could also try deleting your data in a bunch of smaller blocks rather than one huge one.AFAIK, Khalik is right and you shouldn't have trouble selecting from other tables than the one from which you're deleting. At least that's been my experience and jives with my understanding of row locking. Unless of course your computer is bogged down in the memory, hard disk or CPU. |
 |
|
|
|
|
|