no stored balances?

TrintTrint Member Posts: 44
edited 2003-09-09 in Navision Attain
in chapter 1 of the Navision Attain Overview, around the SIFT definition, it says there are NO stored balances anywhere in Navision. If that is true, how does calculations happen quicker than almost all other processes?? How do these (no balances) calculations happen instantly?
Thanks,
Trint

Comments

  • eromeineromein Member Posts: 589
    That nice off you to ask.... Let me explain this briliant technoligy.

    Navision has something called a sumindex. You can set it in keys. In this sumindex field a total calculation of a value is stored. See example
    RecID       Value      SumIndex
       1         10          10
       2         20          30
       3         30          60
       4         40          100
       5         50          150
       6         60          210
       7         70          280
       8         80          360
       9         90          450
    

    Here you see the Sumindex is a total (cumulated) of the value column. Now the fun part commes.

    If you want to have the sum of RecID 3 till 6 do the following:

    Take the sumindex value of recid 6 (210) minus the sumindex value of recid 3 - 1 (recid 2, 30) which would be 210 - 30 = 180. This is the total sum of the value column from 3 to 6.

    Why is this fast? Even if you have millions of records, Navision only has to read 2 (if filters are right!) records form the database.

    Isn't that nice!
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
Sign In or Register to comment.