SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Truncate Table running long
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bridge
Yak Posting Veteran

93 Posts

Posted - 07/27/2005 :  07:32:44  Show Profile  Reply with Quote
I have a table that has 188293 rows. When I run truncate table command it keeps on running for 11 minutes and even more. I just cancelled it. Please let me know why is it taking so much time?

madhivanan
Premature Yak Congratulator

India
22761 Posts

Posted - 07/27/2005 :  07:41:17  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
Make sure that table is not used by other transactions or applications

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

bridge
Yak Posting Veteran

93 Posts

Posted - 07/27/2005 :  07:47:01  Show Profile  Reply with Quote
I am the only one who is accessing the table
Go to Top of Page

rockmoose
SQL Natt Alfen

Sweden
3279 Posts

Posted - 07/27/2005 :  10:22:28  Show Profile  Reply with Quote
>> I am the only one who is accessing the table
Very noble of You to take the blame.
Run sp_who2, to make sure You don't have a lock on the table.

Other than that, TRUNCATE should not take that long.
It's more or less instantaneous.

rockmoose
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000