Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
MikeDevenney
Starting Member
20 Posts |
Posted - 2008-03-15 : 15:46:19
|
I am writing a .NET web application that includes a module for tracking production and shipping (which is their inventory, effectively). My question is one of best practices. I'm not sure the way I was planning on doing it is the best way to go... This is somewhat simplified from the way the system will actually work but the parts I removed won't change how this is handled any. My plan: I would store the date, the itemID and the quantity produced for each item when they submit their daily production #'s. On the page where they enter their shipping numbers I would store a negative value. When someone wants to see the current inventory I load the production and shipping records, group by ItemID and Sum(Quantity) to show the total for each item. The problem I see coming down the road is at some point there will be millions of rows involved in calculating inventory. Each month it will take longer and longer to calculate. Is there a trick (or an accepted best practice) for how to do this? Mike Devenney |
|
|
|
|