Truncate table lock issue
In my SQL2000 stored procedure, there are 9 truncate table commands.
But the the stored procedure is take above 15 minutes to execute.
In this stored procedure, truncate table command has no problem.
But an insert query into that table is very slow.
In the insert query, select some views output and insert into the table. But these select output is very slow.
I search some forums. They said that lock problem for the object. Query execution delayed for a exclusively accessed object.
How can I remove the lock for my strored procedure running faster ?
AdvertisementHere are the bad news: you need to have some understanding of indexing to get some results out of it. But since we don't know anything about your queries, we cannot really give much better advice. What we can say is that TRUNACTE TABLE has nothing to
do with it. Probably not locking either. Locking would come from concurrent activity in the database. Is there any?
Normally, we ask people to submit the code they have problem with. In this case we would also need see the view definitions. (Else we would still be in the dark.) And if the views are built on views, we need to see these as well. This may result in more
code that is practic to handle here, but I leave that up to you. As a hint: in the next step we are much likely to ask for the table and index definitions.
Erland Sommarskog, SQL Server MVP, [email protected]
- 1Proxy was not working in sap r/3 10-11
- 2My iTouch 4g may have been hacked without my knowledge 10-11
- 3Mac Book wont't print to MP530 via AX 11-30
- 4Business Place in selection screen of FS10N/FAGLB03 11-30
- 5Query related to OAAQ 11-30
- 6Configuration carte usb 6008 11-30
- 7Setting background-image as editable in Fluid Grid Layout (Template file) 11-30
- 8How To: Use Like '*' with DoQuery 11-30
- Firefox is not opening and is NOT present in task manager10/11
- How to fix Illegal seek error .DMG?11/30
- Who does know which bapi for Clearing,sucu as F-32 F-44 ,thank you!11/30
- USB 2.0 Support for K8N Neo211/30
- 2015.28 Release Notes11/30
- How can I calculate disk space/DB space and storage spaces.11/30
- Problem plotting binary file11/30
- Frequent locations missing in iPad 4 with cellular & iPhone 411/30
- Cant create "normal" activities in role Web bus. Role FCC_PSCD11/30
- Help connecting to an LDAP node11/30