473,769 Members | 5,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Output Parameters versus Recordsets in Stored Procedures

I've read that stored procedures should use output parameters instead of
recordsets where possible for best efficiency. Unfortunately I need to
quantify this with some hard data and I'm not sure which counters to
use. Should I be looking at the SQL Server memory counters or something
else.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
1 1300
Darter Dan (da*******@dart er.com) writes:
I've read that stored procedures should use output parameters instead of
recordsets where possible for best efficiency. Unfortunately I need to
quantify this with some hard data and I'm not sure which counters to
use. Should I be looking at the SQL Server memory counters or something
else.


There was an article on this in SQL Server Professional, quite a few years
ago. Their archive is on www.pinpub.com. But this was a test on 6.5, and
I have a vague recollection of the aame author arriving at conflicting
results for SQL2000. But I could be wrong.

Anyway, if you want to benchmark yourself, you should simply measure
execution time on the client side. You will have to make a lot of calls
to get significant results, I would suppose.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
8305
by: Steve Holden | last post by:
Has anyone, with any driver whatsoever, managed to retrieve output parameters from a SQL Server stored procedure? I've just been rather embarrassed to find out it's not as easy as it might seem, and people are saying bad things about Python as a result :-( mx.ODBC, which I regard as a highly-capable module, does not support the callproc() API, and suggests use of the ODBC call format. It has caveats in (some of) the documentation...
2
1403
by: Toonman | last post by:
I have a single .asp page that opens a connection and then sequentially opens and closes 14 recordsets from stored procedures to obtain various product information before closing the connection. Is it common practice to do something like this? Or is opening 14 recordsets going to become a real problem when the page goes live and starts getting high web traffic? Thank you in advance for any information you might provide.
3
2702
by: sans_spam | last post by:
I want to pull 2 different recordsets using 2 different stored procedures using the same Data Connection. Below is the code that I currently have, but I'm getting an 'Object Required' error message. Am I doing this correctly, or at least headed in the right direction? Can someone tell me the most efficient way (provide a code example) to pull 2 different recordsets from the same Data Connection? Set dConn =...
11
11107
by: Axel | last post by:
Hi, I am currently creating an ASP page that returns a recordset of search result based on multiple keywords. The where string is dynamically built on the server page and that part work quite well. However I want to also return the number of records in the recordset and I can not manage to get any output parameter working. Even if I assign SELECT @mycount=100 (or SET @mycount=100) in the SP the only value set in mycount is always NULL. ...
20
2654
by: Darryl Kerkeslager | last post by:
I use the following code to retrieve to recordsets into two local tables, from an mdb file over a WAN. Works fine, but I'm trying to tweak the speed, and I have some questions: 1. I tried both an ADOX-created stored procedure and a regular Access parameter query. After several tests, I came to the conclusion that there was no statistcal difference between the two. Does this make sense, or could I do something different to speed it up...
2
3898
by: Mark | last post by:
I created a test to check the execution time difference between executing a SQL Server stored procedured using explicit parameters versus not. In one case I created new SqlParameters in the code, and added the parameters to the SqlParametersCollection of the SqlCommand object. In the second, I just made it all into long execution string. I found that both executed with the same speed. I would claim that the second (shorter) method is...
1
1810
by: Joe Van Meer | last post by:
Hi all, I have an app that currently runs through 3 seperate stored procedures each returning a count of records. What I would like to do is combine these calls into one call, however I am having an issue getting the output parameters' values after execution. Here is a snipit of code that calls one for simplicity's sake: I think I am close, i was under the impression I could use the datareader to get at it, but is is always returning ...
1
5726
by: stjulian | last post by:
If inside a stored procedure, there a SELECT statement to return a recordset and another SELECT to set the value of an output parameter (as in SELECT @OutValue = Name FROM table WHERE pkid=5), would 2 execute statements be needed to return the OUTPUT parameter? Like this? adocmd.CommandTimeout = 120 adocmd.ActiveConnection = conn
3
5120
by: leesquare | last post by:
Hello, I need some help getting output values from my stored procedures when using adodbapi. There's an example testVariableReturningStoredProcedure in adodbapitest.py, and that works for my system. But my stored procedure also inserts and accesses a table in the database. Here's what I have it boiled down to: So, when I have
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.