Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3307662
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:25:55+00:00 2026-05-17T21:25:55+00:00

I have a table in SQL Server 2008 R2 consisting of about 400 rows

  • 0

I have a table in SQL Server 2008 R2 consisting of about 400 rows (pretty much nothing) – it has a clustered index on the primary key (which is an identity). The table is referenced via referential integrity (no cascade delete or update) by about 13 other tables.

Inserts/Updates/Gets are almost instant – we’re talking a split second (as should be expected). However, a delete using the PK takes as long as 3 minutes and I’ve never seen it faster than 1.5 minutes:

DELETE FROM [TABLE] WHERE [TABLE].[PK_WITH_CLUSTERED_INDEX] = 1

The index was heavily fragmented – 90%. I rebuilt and reorganized that index (along with the rest on that table), but I can’t get it below 50%.

Additionally, I did a backup/restore of the database to my local PC and I have no issues with deleting – less than a second.

The one thing I have not done is delete the clustered index entirely and re-add it. That, in and of itself is a problem, because SQL Server does not allow you to drop a PK index when it is referenced by other tables.

Any ideas?

Update

I should have included this in my original post. The execution plan places ‘blame’ on the clustered index delete – 70%. Of the 13 tables that reference this table, the execution plan says that none exceed more than 3% of the overall query – almost all hit on index seeks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:25:56+00:00Added an answer on May 17, 2026 at 9:25 pm

    Well, I have an answer…

    First off, I pretty much exhausted all options indicated in the question above along with the associating answers. I had no luck with what seemed like a trivial problem.

    What I decided to do was the following:

    1. Add a temporary unique index (so SQL
      Server would allow me to delete the
      clustered index)
    2. Delete the clustered index.
    3. Re-add the clustered index.
    4. Delete temporary the unique index.

    Essentially, I wiped and re-added the clustered index. The only thing I’m able to take away from this is that perhaps part of the index or where it was physically stored was ‘corrupted’ (I use that term loosely).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database table (SQL Server 2008 R2 Express edition) that has a
I have a table with 300 million rows in Microsoft SQL Server 2008 R2.
I have user table in SQL Server 2008 r2. Nothing there is encrypted yet
I have a table called XML (in SQL Server 2008) and it has a
I have added an index for a table in sql server 2008. I would
I have a simple database table (SQL Server 2008 R2 Express), which has a
I have a table in a SQL Server 2008 database. This table has a
Just a SQL Server 2008 generic question, I have a table that has around
I'm using SQL Server 2008 and I have a table that has a 'Status'
I have a table in a sql server 2008 database that contains bunch of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.