[thelist] ASP vs TSQL

Oren Levin lists at pinetree.net
Thu May 23 07:10:01 CDT 2002


Really?

I would think that the ASP method would result in X number of update
statements against the database.

The TSQL method would result in a call to the stored procedure, the
procedure looping through the data and then X number of update statements.

If you have a large number of updates then there may be an economy of scale
in having the database do the looping if it could process the array
faster/better/more efficiently than the ASP code. If you just have a couple
of updates then the additional call to the procedure and the procedure's
work may not be beneficial at all.

The only way to know for sure is to code both and benchmark.

Oren
-----
Oren Levin, Web Developer
olevin at audible.com, 973.837.2811
Get free digital audio - www.audible.com/spreadthewords

-----Original Message-----
> ... perhaps I would be better off just passing the array through
> to a stored procedure and allowing it to loop through it.
> Resulting in one call to the database, rather then repeated ones.
> Would this be a good idea?

hi norman

yes
evidence, while anecdotal, suggests significant savings
makes for cleaner code, too

rudy




More information about the thelist mailing list