wooody1245
Programmer
I've got a stored procedure that feeds a Crystal Report that is sometimes very slow and sometimes very fast. When I run the stored procedure using Query Analyzer, it only takes about 10 seconds to return 7 to 10 thousand records. When I run the Crystal Report, it takes about 5 minutes to get the same data.
I know it sounds like a problem with Crystal Reports but I don't think it is. When I use SQL Profiler I can see where Crystal calls the stored procedure but it takes 5 minutes to complete.
I've tried making an exact copy of the stored procedure with a different name and it runs perfect, sometimes. Other times it will take 5 minutes to complete. Sometimes the original stored procedure will run very quickly too. Anytime either stored procedure is slow, I can use SQL Profiler to verify when the SQL Server started and finished the query. It's always proportional to what I see with Crystal.
I'm getting really bummed out by this. Any ideas?
I know it sounds like a problem with Crystal Reports but I don't think it is. When I use SQL Profiler I can see where Crystal calls the stored procedure but it takes 5 minutes to complete.
I've tried making an exact copy of the stored procedure with a different name and it runs perfect, sometimes. Other times it will take 5 minutes to complete. Sometimes the original stored procedure will run very quickly too. Anytime either stored procedure is slow, I can use SQL Profiler to verify when the SQL Server started and finished the query. It's always proportional to what I see with Crystal.
I'm getting really bummed out by this. Any ideas?