VC ADO Extension vs. SP Output Params 
Author Message
 VC ADO Extension vs. SP Output Params

Hello - does anyone have an opinion on which of the two offer better
performance for single-row selects:

using a recordset to store the values via ADO VC++ Extensions or
using an ADO command object using output parameters from a stored procedure.

ADO Extensions are very efficient, since you bind recordset columns to C++
types at compile time.  I can then just execute dynamically built SQL
strings against a connection to populate the (single row) recordset.
However, if I use a stored procedure with output parameters, I don't incur
the overhead of a recordset with all its meta-data for just one row.  On the
other hand, I'm forced to use variants with this technique.

Any opinions on which is faster?

Thanks



Mon, 26 Aug 2002 03:00:00 GMT  
 VC ADO Extension vs. SP Output Params
The stored procedure is certainly faster.  As you said, otherwise you are
required to bring back a Recordset to change data.  This is not efficient.
It also forces someone (client or server) to keep track of cursors.  The
stored procedure method is all client side processing until you execute it,
so it's nice to the server.

Usually the most efficient method for doing an update is to write your own
UPDATE SQL statement and just execute it directly.  This way only the
columns that need updating get put into the SQL statement, so fewer columns
get updated.

Not that I'm advocating one over the other.  Unless your need a optomized
database, pick which ever method makes your life easier.  If you do 1
INSERT/UPDATE every 2 seconds, your probably still only using 1% of the
resources for that time span.


Quote:
> Hello - does anyone have an opinion on which of the two offer better
> performance for single-row selects:

> using a recordset to store the values via ADO VC++ Extensions or
> using an ADO command object using output parameters from a stored
procedure.

> ADO Extensions are very efficient, since you bind recordset columns to C++
> types at compile time.  I can then just execute dynamically built SQL
> strings against a connection to populate the (single row) recordset.
> However, if I use a stored procedure with output parameters, I don't incur
> the overhead of a recordset with all its meta-data for just one row.  On
the
> other hand, I'm forced to use variants with this technique.

> Any opinions on which is faster?

> Thanks



Tue, 27 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. vc ado extensions rs vs stored proc w output params

2. Speed of ADO Recordset vs ADO Command in VC

3. VC extensions for ADO

4. Different output of printf in VC vs. Borland

5. ADO Speed VB vs VC

6. 65536 limit in ADO.NET SP argument ?

7. ADO + Win NT 4.0 + SP 5 problem

8. what is the command syntax for calling a stored procedure with output params

9. CRecordset and output params from a stored procedure

10. Output Params w Command Object

11. iostream vs iostream.h -- VC++5 vs VC++6 problem

12. ADO Interface params in attributed project (VC7)

 

 
Powered by phpBB® Forum Software