Insert query is too slow in one server and working fine in on another server of same configuration

  • Hi,

    I am facing strange issue with insert query.

    I have one server in which Insert query is too slow i.e. for inserting 29K rows in temporary table it is taking 20 seconds.

    But same query is taking 2 seconds in other server with same configuration.

    I have verified the Service Pack and other configuration and all are same.

    Please help me resolving the issue

    Thanks in Advance

    Nishant Shende

  • are there differences in what is running on the servers?? are all the indexes the same?? there is so much that can be going on here.

    please see this link for the best way to post performance problems

    http://qa.sqlservercentral.com/articles/SQLServerCentral/66909/


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • Thanks for the reply...

    I am inserting data into temporary table so there is no question of indexes.

  • nishantshende-532951 (7/20/2012)


    Thanks for the reply...

    I am inserting data into temporary table so there is no question of indexes.

    But where is the data coming from? It is very likely that the problem is the select statement that is generating the data for your insert.

    At this point we have no details to work with.

    Here some guesses at what the issue MIGHT be:

    improper/missing indexes

    stale statistics

    scalar functions

    cursors

    triangular joins

    recursive cte

    Before you reply back that it can't be any of those consider that we can't see your screen from here. Give us some details about what you are doing and there will be lots of people jumping in to help.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • nishantshende-532951 (7/20/2012)


    I have verified the Service Pack and other configuration and all are same.

    Nishant Shende

    When you say "other configuration" what are those?

    Execution plans are same in both the server?

Viewing 5 posts - 1 through 4 (of 4 total)

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