I won't bore you with how I discovered this phenomenon, but rest assured if you run Microsoft Query Analyzer on a remote computer using Remote Desktop Protocol (RDP), you may notice strangely slow execution times when returning a large number of rows in text-result mode. If you switch to grid results, or if you minimize the query analyzer while the query is running, you will not have this problem!
A real world example:
A SQL Query that returns 40,000 records. When running this query in text results mode via RDP, Query Analyzer consistently took 8-9 seconds to finish. When running in grid results mode, it took < 1 second! When minimized in text results mode, it took 2-3 seconds (most likely due to my slow reflexes minimizing the window). You may find that this is true for many programs that are outputting a large volume of text to the screen -- keep then minimized if possible. And it's not what you might initially think, that a large number of screen-draws are being performed, slowing things down. Nope, my query analyzer results were not scrolling down the screen visibly. This is just some weird behavior with RDP and certain text displaying screens. If anyone knows why this happens, feel free to comment below.
(Note: this behavior was specifically observed using RDP connected to a Windows 2003 Server running SQL Server 2000.)
Wednesday, April 18, 2007
Using SQL Query Analyzer via RDP Can Be Slow
Posted by Thomas at 4/18/2007 08:04:00 PM
Labels: query analyzer, rdp, slow sql queries, sql server
Subscribe to:
Post Comments (Atom)
1 comment:
Thanks for your post. I was experiencing the same thing. Thought I was going crazy. On 2 different SQL 2000 servers - one Win2K and the other Win2003.
David
Post a Comment