Records being added while being deleted as well

  • Hi all, 

    First off, I have a database that has over 250 million records and am in the process of clearing out the old records (the application fine tuning wasn't cleaning out the old records during the scheduled job), my question is why (or how) records are still being ingested when a delete statement is running? I am using a WHERE statement and there are no connections being made to the database except for mine.

    Thanks!

  • Kenn Edwards - Thursday, July 19, 2018 1:02 PM

    Hi all, 

    First off, I have a database that has over 250 million records and am in the process of clearing out the old records (the application fine tuning wasn't cleaning out the old records during the scheduled job), my question is why (or how) records are still being ingested when a delete statement is running? I am using a WHERE statement and there are no connections being made to the database except for mine.

    Thanks!

    Well, hard to say since we can't see what you see.  Could be quick connecting processes, triggers, scheduled jobs.  Just not sure.

    Data doesn't just appear out of thin air.

  • are you using nolock hint, read uncommitted isolation?

    ***The first step is always the hardest *******

  • Kenn Edwards - Thursday, July 19, 2018 1:02 PM

    Hi all, 

    First off, I have a database that has over 250 million records and am in the process of clearing out the old records (the application fine tuning wasn't cleaning out the old records during the scheduled job), my question is why (or how) records are still being ingested when a delete statement is running? I am using a WHERE statement and there are no connections being made to the database except for mine.

    Thanks!

    Can you clarify what you mean by "Records are still being ingested", please?

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

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