Generally doing as much as you can in the DB is more performant.

To do the CF solution you have to make many DB calls (all of which get
validated, use up network resources and spend some time on the driver).  In
the SP solution you pass one thing to the DB, the DB churns a bit then you
get back one answer.

There are reasons for doing it in CF (maintenance, simplification of the DB,
etc), but I've never seen any performance arguments.  ;^)

Jim Davis

From: Tangorre, Michael [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 12, 2004 2:49 PM
To: CF-Talk
Subject: CURSOR or CFLOOP

I am new to the idea of using CURSORs in SQL Server but would like some
input.
>From an efficiency standpoint, which is a better choice?

select query + cfloop + insert query

or

stored procedure using a cursor to do row by row inserts

The select query will never return more than 12 rows.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to