• coolchaitu - Wednesday, January 24, 2018 11:24 PM

    Good Morning Experts,

    We had a database on SQL Server 2012. INSERTS were running fine. We migrated this database to 2016 and noticed same INSERTS taking very very long time. Could it be due to different settings on SQL 2016? Please help

    We had the same problem with many stored procedures that did multi-row inserts.  It was all thanks to the "improvements" they made in the optimizer (Cardinality Estimator specifically, IIRC).  We "patched" the problem by using the Trace Flag that says to use the old CE.  Unfortunately, that also means that our "get out of the woods patch" has become the fix because people don't understand that we actually do need to tweek,n,peak the inserts and won't even try to fix them.

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