Database is slowing down [Code Suspected]

br0ckbr0ck Member Posts: 5
edited 2007-11-28 in Navision Attain
Hello,

We have some development work done in the past and we noticed that the database takes a long time to display line items in various places
For example in a sales order Navision will stall when adding lines and in the footer of the application the following message is displayed
“Counting records in the Sales Invoice Line table, press Ctrl+Break to cancel… 2240”
We also get
“Searching the Sales Invoice Line table, Ctrl+Break to cancel… 9120”
This does not happen on other Navision systems I work on

Thanks in advance
Navision 3.01B

Comments

  • ara3nara3n Member Posts: 9,256
    I'm guessing your are on native db.
    Yes the reason could be C/AL code. The user/Code is not setting the correct key before finding the records.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • br0ckbr0ck Member Posts: 5
    yes we are on native

    so setting a primary key could speed things up
  • kinekine Member Posts: 12,562
    br0ck wrote:
    yes we are on native

    so setting a primary key could speed things up
    No, setting key including all filtered fields will help. And not using filters on flowfields.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • SavatageSavatage Member Posts: 7,142
    br0ck wrote:
    “Counting records in the Sales Invoice Line table

    This is a killer and if you are on 3.01B you've had Navision for a while.

    I added a count field myself on the "Posted Sales Invoice List" form
    & all was fine for the first year or so. But now we are at 150,000 it's a killer!

    I simply removed the count and all sped up again, Whatever the reason was for adding it was not worth the time you had to wait each time that form opened.

    And I was counting the sales Header not the salesline's which for us is around 3,800,000. Not a fun count for Nav.

    It works fine on eht sales order or sales line becuase new orders are added and when posted they are gone, so there is always a plus/minus happening.

    Sales inv header & lines are continually growing (unless you delete) making them slower and slower everyday you count.

    **that's all assuming the server's setup & config is good :-k
Sign In or Register to comment.