Options

NAV5SP1 - Consequences of Bulk Inserts?

pdjpdj Member Posts: 643
edited 2008-01-25 in SQL General
The announcement of NAV5SP1 mentions Bulk Inserts are introduced, but does anyone know what it means?

I guess it means that all inserts are buffered and inserted bulked in some way, but when? Right before the commit or right before any other transaction to any table or the exact table?

If it doesn't insert until the commit, how about reading of just inserted data in the same transaction. Will reads in the same transaction be able to find the records not yet fully inserted? (and count and modifyall and deleteall etc.)

If it doesn't insert until other transaction in the exact table, how about flowfields in other tables. If I insert a CustLedgEntry (buffered) and then do a calcfields of the balance of the customer. Will the result be different than today/native?

Is this change also covering updates and deletes, or is it only inserts?
Regards
Peter

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    This is how native behaves right now. When you run a transaction it doesn't appear in the db until the data is committed. In your session you can reference any record that you've inserted. So your code will work the same way.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    pdjpdj Member Posts: 643
    ara3n wrote:
    So your code will work the same way.
    That would be nice, but...

    Are you saying that it will buffer all inserts until the commit, but allow read/modify/delete/count of the not-yet-inserted records from the same session? Wouldn't that increase the hardware requirements for the clients quite a bit...
    Regards
    Peter
  • Options
    ara3nara3n Member Posts: 9,255
    The Native client and SQL client have the same hardware requirements.

    Sqlclient and native caches the records right now so no change in hardware.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    bbrownbbrown Member Posts: 3,268
    With Navision SQL the default transaction type UpdateNoLocks behaves the same as Browse until a transaction begins. Browse translates to the SQL isolation level of Read Uncommitted. This is why a user will see uncommitted data.

    With Native it maps to Snapshot during read operations which does not read uncommitted data
    There are no bugs - only undocumented features.
  • Options
    kinekine Member Posts: 12,562
    It will buffer the inserts until commit or:

    the inserted data are read/modified...

    it means, it will postpone the inserts until latest possible point. If the application find that you need the data, they will be inserted.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.