SQL Performance Query Object

byronicbyronic Member Posts: 19
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:

4a24ekgwnlqz.png


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

740modkionjy.png


The query object that caused the problem looks like this:

otolrhgmr1yg.png


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:

7my5yzod3pge.png



What else could be the problem here?


Thank you very much in advance!

Answers

  • Tony_NCDTony_NCD Member Posts: 22
    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: 973
    Looks like your DataItemLink property is undefined for DL_Leistungsart.
  • byronicbyronic Member Posts: 19
    The properties of the DataItem"DL Leistungsart" look like this in the query:

    bammd2qic2tu.png
  • Tony_NCDTony_NCD Member Posts: 22
    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.