Hi,I have 2 servers - Lets call them A and B.They have the same same database. A database with one table that has 5 12 columns and one of them is XML type. the database is 125~ GBI run the following Script on both. It results 644 rows. set statistics io onset statistics time ondeclare @startDate datetimedeclare @endDate datetimeset @startDate = '2013-03-20 23:00:00.000'set @endDate = '2013-03-20 23:59:59.99'SELECT *FROM [Event]WHERE Time - '4:00:00' > @startDateAND Time - '4:00:00' < @endDate
Server A takes only 1 second and Server B took 30 minutes. As you can see above I had the IO and TIME on. Results for both are here:SERVER A:SQL Server Execution Times: CPU time = 0 ms, elapsed time = 0 ms. SQL Server Execution Times: CPU time = 0 ms, elapsed time = 0 ms.(644 row(s) affected)Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.Table 'Event'. Scan count 25, logical reads 105607, physical reads 0, read-ahead reads 38, lob logical reads 15, lob physical reads 0, lob read-ahead reads 16.Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. SQL Server Execution Times: CPU time = 3964 ms, elapsed time = 592 ms.
SERVER B: SQL Server Execution Times: CPU time = 0 ms, elapsed time = 0 ms. SQL Server Execution Times: CPU time = 0 ms, elapsed time = 0 ms.(644 row(s) affected)Table 'Event'. Scan count 1, logical reads 13501883, physical reads 51263, read-ahead reads 13458858, lob logical reads 15, lob physical reads 4, lob read-ahead reads 16. SQL Server Execution Times: CPU time = 1885615 ms, elapsed time = 2097132 ms.
This table doesn't have any indexes. And it's quite obvious the problem is on the servers. Can you please let me know what the results set mean? what should I look at next?- Shiyam