• Brandie Tarvin (5/19/2016)


    Ken McKelvey (5/18/2016)


    tcalloway (5/17/2016)


    I have a Stored Procedure which runs every hour during business hours. It's purpose is to delete all rows, about 28,000, in a table and then repopulate the rows with an INSERT INTO command from an external database

    I inherited something similar a few years ago. My solution was to move the repopulating tables to another DB in SIMPLE recovery and then create SYNONYNs in the main DB.

    Why do all that work when you can just enable transaction log backups?

    No pun intended but because it's "simple". 😉 It allows for a lot of minimally logged things to happen (which is also a great performance benefit) without the problem of destroying Point-in-Time ability for a given transaction log backup if you elect to do a minimally logged action (change to bulk insert) on your money-maker database. It's also a totally "expendable" table that doesn't actually need to be backed up, which saves on disk space, tape space, backup times and, most importantly, restore times.

    --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)