DML Quries are taking long time to execute

  • Hi,

    In one of our prod sqlserver 2008R2 simple DML queries are taking too long time

    Kindly let the reason to fix issues

  • it's not a one line fix; performance and query tuning and analysis, a have entire books written on the subject.

    in general, my knee jerk reaction would be to update statistics and see if it makes an immediate impact, and then start with

    the scripts at Glenn Berry's SQL Server Performance SQL Server Diagnostic Information Queries for September 2014[/url], and work through the top 25 in each category, over and over again, until performance was acceptable.

    I'd also recommend Brent Ozars SQL Blitz Scripts[/url], which are great for bringing attention to potential problems for the new DBA who is just taking over, or getting a handle on a SQL system.

    If it's too much for you, bring in a contractor or DBA you might see has a good reputation in the SQL community, specifically for performance tuning, and look over his shoulder till you get the hang of it.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Identify the query or queries that are taking a long time.

    Observe their locking, blocking and wait statistics behaviors. That might tell you what's wrong.

    Look at their execution plans. That might tell you what's wrong.

    Fix what you need to fix.

    Other than that, this is a very involved topic. For lots of detail on how to get this done, get a copy of my book on query tuning, linked below.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply