Options

Nav client uses network different to SQL Server

sqlsotnsqlsotn Member Posts: 7
edited 2008-06-05 in SQL Performance
I'm a navision newbie, so I hope this question makes sense.
If the query Select * from Sales Header is run in SSMS from a client, then I can see the 150MB of network traffic to give me all the fields for all the records from the SQL server to my pc, but when I open a list form based on the sales header table and jump to the end then to the beginning, only 1 or 2 MB of network traffic is generated? Can someone eplain to me how Navision client uses the network when populating a list form where you can only every see 10 records at a time, even though that are over 150K records. (The T-SQL I am using is copied from Profiler but without the cursor prepexec bits). I am restarting SQL Server between each running for testing.

TIA

Comments

  • Options
    kinekine Member Posts: 12,562
    1) NAV is using cursors to read the data...
    2) You can see what is NAV running when you turn the Profiler but you need to catch events like SP:StmtCompleted and SQL:BatchCompleted. Than you will see the actual SQL statements NAV is running...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    krikikriki Member, Moderator Posts: 9,089
    [Topic moved from Navision forum to SQL Performance forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Hi,

    When you run 'Select *'... all the data is transferred from the table to the SSMS studio.

    On the other hand - as Kine said - NAV uses cursors. To simplify the picture you may think of it as the case when Select *' transfers the result to the SQL Server memory, and PC request only few hundreds at a time. Precisely speaking 500 with default config.

    If you jump right to the bottom of the list (table) NAV sends proper FETCH command to grab only last records.

    Regards,
    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.