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 6181995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:07:33+00:00 2026-05-24T01:07:33+00:00

When executing this simple SQL Delete statement, I’m getting a timeout from SQL Server:

  • 0

When executing this simple SQL Delete statement, I’m getting a timeout from SQL Server:

DELETE FROM dbo.[User] WHERE Id = 95146

There are about 95.000 records in the table.

I thought it might be because of indexes on the table, so I’ve deleted all except from the primary key (Id) which is clustered, but this didn’t help.

I’ve deleted all the statistics I created as well, but also without any effect.

What else can I do to optimize for this?

Kind regards,
David

  • 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-24T01:07:34+00:00Added an answer on May 24, 2026 at 1:07 am

    How many foreign keys do you have referencing the Id column of Users, and are there indexes on these columns?

    If cascade is set as NO_ACTION, as you’ve indicated, the time may be being spent by SQL Server having to perform a full table scan on each of these tables to ensure that there’s no reference to Id 95146 – I’ve seen this easily take minutes at a time before, if the other tables are large.

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

Sidebar

Related Questions

I'm executing a query like this select field from table; In that query, there
Is it possible to connect to Sql Server for the purpose of executing simple
I'm executing a stored procedure on sql server 2005 from livecycle es 8.2 the
I am executing a simple query against SQL Server 2005: protected static void InitConnection(IDbCommand
I have this SQL Server 2008 UDT: CREATE TYPE [dbo].[IdentityType] AS TABLE( [Id] [int]
I am having difficulty executing a MS SQL Server stored procedure from Java/jsp. I
When executing the following (complete) SQL query on Microsoft SQL Server 2000: SELECT B.ARTIFACTTNS,
I'm having some issues with the entity framework. I'm executing a simple select from
OK. I've read things here and there about SQL Server heaps, but nothing too
This is probably an oldie-but-goodie. I am using System.Data.Common for an interchangeable Oracle/SQL Server/SQLite

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.