Stored Procedure Information RRS feed

  • Question

  • Hi All,


    I am currently developing an application, which uses various datasets and datatables populated via stored procedures.  I do not currently have an issue with application, as it currently works, but the issue I have is the fact the when running the stored procedure, the application appears to freeze, this is due to the stored procedure taking too long to run.


    So my question is, is there a way to show some sort of status message or progress bar whilst the stored procedure is running?  Also the stored procedure is like one long select statement, so not sure how to incorporate this into a progress bar?


    Thanks in advance.


    Tuesday, January 8, 2008 7:59 AM


  • You could execute stored procedure asynchronously in a case if you are using .NET 2.0 and SQL Server. SqlCommand class has BeginExecuteReader method that allows opening reader in asynch mode. But maybe you should focus on design of your application and stored procedure, and analyze the cause of this performance issue. You might think about reducing of data selection in a case if your application selects huge amount of data in one shot, and load data in portions. You could also run stored procedure and get query execution plan for it to see where it spends most of execution time, and try to improve that part.


    Tuesday, January 8, 2008 11:25 AM