Inventory (Quantity on Hand) Flowfield

NavStudent
Member Posts: 399
Hello
I was wondering why it sums up all the quantity in ILE, instead of summing Remaining quantity.
Wouldn't it be faster, especially since in 5 SP1 they will use indexed views?
The flow field should do a lookup on remaining qty where it's open for that item.
I was wondering why it sums up all the quantity in ILE, instead of summing Remaining quantity.
Wouldn't it be faster, especially since in 5 SP1 they will use indexed views?
The flow field should do a lookup on remaining qty where it's open for that item.
my 2 cents
0
Comments
-
What 's the difference? It still needs to sum the same number of records?
Basing the sum on Quantity only requires that the SumIndex (or indexed view) be updated on insert of new entries. Moving the sum to "Remaining Amount" would also require the SumIndex (or indexed view) to be updated on record modify (item applications).
Indexed views do not come at no cost. They are real tables stored on the disk and must be updated when the underlying tables are changed. There is a trade-off between the faster access of the indexed view and the additional writes required.There are no bugs - only undocumented features.0 -
The difference is that (maybe I wasn't clear), to sum only ILE that are OPEN.
Granted Inserts will have the same cost, but the real benefit will be Reads.
Cause You'll only look at a tiny set of open ILE. Not millions.
Also they should create a separate file group if that's possible for those indexed views.my 2 cents0 -
I was thinking that it has to look at every entry anyway to determine if it's open or not :-k0
-
Trying to set a filter on a Boolean field wil gain you no performance advantage. SQL will simply ignore the filter (not very selective) and do a table scan.
Yes, inserts will have the same cost, but your approach would add the cost for modifies.There are no bugs - only undocumented features.0 -
sql will select the key because you'll have only a very small open tries.
Do a query for an item that is open on sql and see the execution plan.
Modifcation will have a cost, but the read will be much faster. That’s the whole Point of SIFT.
Anyways your issues do not matter because the remaining quantity has a SumIndexfield, hence a indexed view.
All I’m suggesting use one view instead of another.my 2 cents0 -
Savatage wrote:I was thinking that it has to look at every entry anyway to determine if it's open or not :-k
Open is flaged to false once remaining qty is set to zero.0 -
NavStudent wrote:sql will select the key because you'll have only a very small open tries.
That's an assumption. You will probably get those results where there is a very small percentage of open entries. But what about the system where there is a large number of open entries.There are no bugs - only undocumented features.0 -
Find me a system that has been live for 6 months and has more open entries than closed for an item. You can improve the query by setting where remaining qty <>0.
Also the SumIndexFields should be covering fields in the indexes, so that no lookup to the clustered index is done.
In the two scenarios, in first you are reading all the records for a given item. In second scenario you are reading a subset. No matter how the records are in the db the subset will always be faster.my 2 cents0 -
Back to your original point:
This discussion is somewhat irrelevant in the context of an indexed view. The indexed view stores the result set of the view and not the individual source records. So whether the sum was on quantity or Remaining Quantity the result is the same. Your approach may improve normal view queries (in most cases) but it would have no impact on an indexed view.There are no bugs - only undocumented features.0 -
NavStudent wrote:I was wondering why it sums up all the quantity in ILE, instead of summing Remaining quantity.Kai Kowalewski0
-
yes older version would create just ILE, with 3.x version it creates value entry. And I've seen those db's as well and had to fix a few.my 2 cents0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions