Reducing the scope of SQL queries to a single attribute in NAVISION 2009 R2

navision2009R2navision2009R2 Member Posts: 8
edited 2020-01-23 in SQL General
In NAVISION 2009 R2, it seems like NAV always request every attributes of the records (by sending a "SELECT * FROM" SQL request), even if I only use a single attribute of the records (e.g. : via code on a report or via the columns of a form).

Example of an actuel SQL request send by NAV : SELECT * FROM "database_name"."dbo"."company_name$Service Line"
  • Isn't NAV compiler supposed to avoid such waste of data ?
  • Is there a way (via code or via a NAV/compiler parameter ? ) to force NAV to reduce the scope of the SQL queries to the columns actually used by NAV (e.g : "SELECT Name FROM...")

Answers

  • JuhlJuhl Member Posts: 724
    No.

    But its usually not a problem, as data is cached in nst.
    Follow me on my blog juhl.blog
  • krikikriki Member, Moderator Posts: 9,115
    The only way would be to use queries ... which don't exist in NAV2009R2...
    And those are NOT cached in the NAV service tier.

    So as Juhl said: "No.".
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.