Question about Optional Parameters in Stored Procedures

  • I have to agree with Orlando. TVPs are awesome when used properly.

    My only beef with TVPs isn't really with TVPs. It's what Developers try to pass to a proc that bugs me. I've seen developers create a quarter million rows of 4 column data to pass to a stored procedure as part of some software they were building. They just couldn't understand why things kind of ground to a halt when just 2 of them tried it at the same time. Even TVPs are going to be a problem for such a thing.

    The fix for that particular problem, BTW, was to simply generate the data within SQL Server based on 4 individual singleton parameters passed to a proc. The problem went from several minutes down to milliseconds and the pipe no longer needed to be water cooled.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply