SQL Server Performance

SQL Query taking too long time to execute.

Discussion in 'SQL Server 2005 Performance Tuning for DBAs' started by sagartathode, Oct 26, 2007.

  1. sagartathode New Member

    I have an SQL query which is doing a select joining several tables based on certain conditions. There are 35 joins and 35 conditions. We are using SQL Server 2005. The problem is that this particular query is taking unusally long time (17 hrs) to execute in the production server whereas the same query used to take only 10 minutes to execute in previously since years. We are exploring whether what could have gone wrong all of a sudden. What could be the probable reasons and what should I investigate.
    Any suggestion is highly appreciated.
    Thanks in advance.
  2. ndinakar Member

    stats out of whac? try reindexing all the tables and doing an update stats with full scan and then run the query. You can see the query plan and identify the tables that need to be reindexed first....
  3. sagartathode New Member

    Thanks for the reply.
    I have executed Update Statistics for each table with Fullscan and ran the query but still takes a long time and returns no rows.
    All the tables are indexed and are on Production server, so reindexing these tables should be done??
    Help needed to troubleshoot in this regard.

  4. dineshasanka Moderator

    Did you try to view execution plan and identify the high cost components of ur query

Share This Page