looking for opinion on how to handle a project...

  • Hi there,

    I picked up a real gem of a project. We have an old VB4 (yes, I said 4) application that is still in existance and running happily. Despite this it has been slotted for a rewrite. In SQL.

    'One' particular method is the meat of the calculations, roughly 4000 lines of VB most of it repeating code looping thru 6 main tables. The question here falls into the repeating sections of code.

    I'm trying determine if it is better to have one monster stored procedure with all the code in it or if I should use #temptables, passed variables and multiple stored procedures for each process within the loops of the main.

    I realize that might be kind of vague but...

  • Well, you came to the right place for opinions :D. Unfortunately I think most will be complaining about how vague your post is. Without knowing what you are trying to accomplish I would investigate if there is a set-based solution to the problem which would probably reduce it from a monster stored procedure to one more manageable. If have to do looping and calculations I still recommend doing it in whatever front end your application is being re-written in.

  • I'm with Jack on this one, Chris... a rewrite should be an opportunity to do things much better. I'd look at the code you're getting to rewrite and bust a hump to try to make it nasty fast, highly scalable, set based SQL so that you don't have to mess with it for another 10 years or so... 😉

    --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 3 posts - 1 through 2 (of 2 total)

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