which of these is faster?
ADO Client side code running across a network performing this code on a fully outer joined table with 10000 records:
Code:
If intNoRecords > 0 Then
rsTitleCodes.MoveFirst
Do While Not rsTitleCodes.EOF
If IsNull(rsTitleCodes!TitleCode) Then
With rsTITCOST
.AddNew
!TitleCode = rsTitleCodes!TitleCodeAlias
.Update
' Debug.Print rsTITCOST!TitleCode
End With
End If
rsTitleCodes.MoveNext
Loop
Next intCount
End If
OR SQL Server server side processing inside a stored procedure using a cursor with code that looks a little like this:
DECLARE join_fill_cur for <SQL HERE>
OPEN join_fill_cur
BEGIN TRAN
FETCH FIRST FROM join_fill_cur
if (@@FETCH_STATUS <> 0)
PRINT 'FETCH NOT VALID'
<UPDATE SQL HERE>
WHERE CURRENT OF join_fill_cur
IF (@@ERROR <> 0)
PRINT 'UPDATE FAILED'
e.t.c e.t.c e.t.c
I reckon it's the latter cause of server side processing blah, usual things blah, blah...Just thought i'd ask the group first before I implement
Thanks...