Performance Issue

  • Hi All,

    I have 2 SQL Servers, both the servers are in clustered environment. Server 1 is the Production Server, and Server 2 is the reporting server. Transactional Replication is set in an interval of 15 mins.

    When I am issuing a SQL Statement against my production server it takes 30 Secs to executes, but while I execute the same statement again my replicated database, it takes more than 30 mins to execute. at the activity monitor, I noticed a very high counter for tempdb, also there are 2 instance of tempdb against the same user.

    Please help.

  • So you have 4 servers? 2 of them are clustered for the production environment, and two are clustered for the reporting environment?

    I suppose that does not really matter. You have transactional replication configured, so the databases must be a little different. It is no surprise you would get different execution plans. Do you have the appropriate indexes replicated? Do you have a clustered index on the table in the reporting database? Have your indexes been heavily fragmented?

  • Yes I have 4 Servers. The query execution plans are same for both the environments. The number of articles are huge in this case.

    I can't see any other reason for the slow execution of the query? Is there any other option to fine tune the query? Is the lock is an issue??

  • Getting the same execution plan and vastly different performance is unusual.

    Assuming the hardware in each environment is similar:

    - Make sure statistics are updated on the reporting database.

    - Verify your indexes are not badly fragmented (transactional replication can do this)

    - Make sure you do not have a bad query plan cached

  • I have tested the DB by taking the backup of the DB in my local machine, which is having the capacity of 1 physical processor, and 1 GB of RAM. Here I used SQL Server developer version, it takes only 11 mins (approx) to execute the query. Whereas in my Production server (12 CPU, 6 GB RAM) it is taking 30 Mins. DB Size is only around 7 GB.

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

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