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.

 All Forums
 Development Tools
 ASP.NET
 Difference in execution times in SQL Server and VB

Author  Topic 

rajk
Starting Member

20 Posts

Posted - 2003-08-22 : 03:33:34
Hi,

We have a situation where we are executing an SP in the database and it executes fine (in less than 1 second).

When we call the SAME SP from VB in a RDO result set (we tried with different options like default options, no options etc.) it takes anywhere between 90 to 200 seconds and as a result times out quite often.

Thanks for the help
Raj


robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-08-22 : 07:23:41
Eeeeeeeewwwwwwwwww, RDO. Hmmmmm. You may seriously want to look at using ADO, it makes better use of data providers and should give you (much) better performance.

Also, if you are looping through a recordset using While not RS.EOF....do something...RS.Movenext...Wend you will always risk timeouts. ADO has methods that allow you to convert an ADO Recordset into an array or delimited string, vastly improving performance. You can then work on the array or string instead of an open recordset.

You will probably have to post your code for us to further assist you.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-08-23 : 14:43:23
Try using the profiler to see what is sent to the server (and when) then executing those instructions in query analyser.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -