Solved

Which faster - recordset or stored procedure?

Posted on 2011-03-16
2
405 Views
Last Modified: 2012-08-14
Hi, we currently have a page that creates a recordset depending on the request query string, roughly as follows:-

If Request("aa") <> "" Then
sql = "Where xxxx = yy"
ElseIf Request("bb") <> "" Then
sql = "Where dddd = cc"
etc

set db = server.createObject("ADODB.Connection")
db.open CONN_STRING

sSQLString = sql
db.Execute(sSQLString)
etc

If we replaced the above with stored procedures as follows, would it be fast or slower?

If Request("aa") <> "" Then
[run SP 1]
ElseIf Request("bb") <> "" Then
[run SP 2]
etc

Thanks!
0
Comment
Question by:pld51
2 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 500 total points
ID: 35150914
assuming the SPs contained the same queries that would be generated by the code (and all else being equal), I doubt it would make much difference -- but if anything, using the SPs might be a microsecond or two faster (in theory).
0
 

Author Closing Comment

by:pld51
ID: 35152347
thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now