Possible Duplicate:
sql runs fast in ssms slow in asp.net
Using SQL Server 2005, there is a sql query on a few big tables and it times out in the program. However, when I run it in Query Analyzer, it finishes in about 30 seconds.
Why the difference?