Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
notmyrealname
98 Posts |
Posted - 2008-12-12 : 11:16:08
|
| Hi,I am developing a VB.Net app that is connected to a database via SQL Server. I have a medium database that i am performing queries on; about 500,000 records. All stored procedures, functions and views are created in the database and simply called by my VB.Net app with DataSets, BindingSources and TableAdapters. I have a stored procedure that returns a list of parts from the database based on their WorkOrder number. i.e.Select... where WorkOrder = @wo_NoThe procedure works fine. The problem that i am having lately is that my server speed is slowing down. I think i have pinpointed exactly when it starts to slow. It goes like this...I run the procedure several times for smaller WorkOrders (1-200 parts). The execution time is about 1 second. I then run the procedure on a large WorkOrder (8500 parts). This execution takes about 15 seconds. Now if i try to run the procedure on the previous small WorkOrders. They now take about 5 seconds to execute. Something tells me that i am leaving some resources tied up.Does anyone know if there is something i need to do in between procedure calls (in SQL or VB) to free up resources tied to the previous call.Any help will be greatly appreciated.Thanks,Joel |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-12-12 : 12:29:26
|
| What your SP is doing? Have you updated statistics? |
 |
|
|
notmyrealname
98 Posts |
Posted - 2008-12-12 : 13:07:04
|
| Stored procedure only returns records. |
 |
|
|
|
|
|