SQL Performance Query Object

byronicbyronic Member Posts: 22
Hello everyone!

We have a performance issue with a query object in NAV BC14.
We isolated the code snippet with the Performance Profiler that caused this issue and we stumbled upon a SQL statement (caused by an Query.READ) which needs 7-10 seconds to run through.

The SQL statement looks like this:


The code that calls the SQL statement is the marked line (StundentabelleAbwesenheiten is the query variable):


The query object that caused the problem looks like this:


We tried to create a new key in the table "DL Lohnzeile", but that had no effect on the duration time of the SQL statement:


What else could be the problem here?

Thank you very much in advance!


  • Tony_NCDTony_NCD Member Posts: 32
    Give us a screenshot of the properties for DL Leistungsart, we need to know how it's linked to the parent table.
  • vaprogvaprog Member Posts: 1,067
    Looks like your DataItemLink property is undefined for DL_Leistungsart.
  • byronicbyronic Member Posts: 22
    The properties of the DataItem"DL Leistungsart" look like this in the query:

  • Tony_NCDTony_NCD Member Posts: 32
    Well, your links look ok, so I suspect the performance issue is with missing indexes. Without knowing your data, this is just a shot in the dark, but here's where I'll be looking.

    Is the DL Leistungsart.Code a primary index? If yes, you're ok, if not, check to see if there's an index setup for it.

    Similarly, is there an index setup for the "Leistungsart Code".

    If there's not an index for the Mitarbeiternr field, then I would add one since it looks like something that may help, given the fixed value.
Sign In or Register to comment.