Results 1 to 2 of 2

Thread: which of these is faster?

  1. #1

    Thread Starter
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754

    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...
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Location
    The Lone Star State
    Posts
    183
    I would agree with you.
    !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width