I have an application wich connects to a SQL Server 2008 Standard database. Recently the database was migrated to a new Windows Server 2008 R2 Server (previously it was Windows Server 2003) with SQL Server 2008 Standard.
Speed is fine on LAN. Though users connecting via VPN have to wait 5 minutes for the application to load. This was not the case before moving the database to the new SQL Server, the wait was < 1 minute.
When running the following code in SSMS from a remote machine (connected via VPN) the results are:
WITH Waits AS (SELECT wait_type, wait_time_ms / 1000.0 AS WaitS, (wait_time_ms - signal_wait_time_ms) / 1000.0 AS ResourceS, signal_wait_time_ms / 1000.0 AS SignalS, waiting_tasks_count AS WaitCount, 100.0 * wait_time_ms / SUM (wait_time_ms) OVER() AS Percentage, ROW_NUMBER() OVER(ORDER BY wait_time_ms DESC) AS RowNum FROM sys.dm_os_wait_stats WHERE wait_type NOT IN ( 'CLR_SEMAPHORE', 'LAZYWRITER_SLEEP', 'RESOURCE_QUEUE', 'SLEEP_TASK', 'SLEEP_SYSTEMTASK', 'SQLTRACE_BUFFER_FLUSH', 'WAITFOR', 'LOGMGR_QUEUE', 'CHECKPOINT_QUEUE', 'REQUEST_FOR_DEADLOCK_SEARCH', 'XE_TIMER_EVENT', 'BROKER_TO_FLUSH', 'BROKER_TASK_STOP', 'CLR_MANUAL_EVENT', 'CLR_AUTO_EVENT', 'DISPATCHER_QUEUE_SEMAPHORE', 'FT_IFTS_SCHEDULER_IDLE_WAIT', 'XE_DISPATCHER_WAIT', 'XE_DISPATCHER_JOIN', 'BROKER_EVENTHANDLER', 'TRACEWRITE', 'FT_IFTSHC_MUTEX', 'SQLTRACE_INCREMENTAL_FLUSH_SLEEP') ) SELECT W1.wait_type AS WaitType, CAST (W1.WaitS AS DECIMAL(14, 2)) AS Wait_S, CAST (W1.ResourceS AS DECIMAL(14, 2)) AS Resource_S, CAST (W1.SignalS AS DECIMAL(14, 2)) AS Signal_S, W1.WaitCount AS WaitCount, CAST (W1.Percentage AS DECIMAL(4, 2)) AS Percentage FROM Waits AS W1 INNER JOIN Waits AS W2 ON W2.RowNum <= W1.RowNum GROUP BY W1.RowNum, W1.wait_type, W1.WaitS, W1.ResourceS, W1.SignalS, W1.WaitCount, W1.Percentage HAVING SUM (W2.Percentage) - W1.Percentage < 95; GO
WaitType Wait_S Resource_S Signal_S WaitCount Percentage
PREEMPTIVE_OS_AUTHENTICATIONOPS 105756.43 105756.43 0.00 414370 48.54
IO_COMPLETION 45143.55 45018.82 124.73 9694208 20.72
THREADPOOL 34310.39 34310.39 0.00 1716 15.75
WRITELOG 7007.94 6642.45 365.49 3923250 3.22
SOS_SCHEDULER_YIELD 5294.30 36.86 5257.44 37125787 2.43
ASYNC_NETWORK_IO 4570.49 4530.22 40.27 286374 2.10
CXPACKET 4380.04 3969.43 410.61 1706409 2.01
PAGEIOLATCH_SH 2321.81 2294.19 27.63 395611 1.07
I would be thankful for any ideas/suggestions?