4 ms·
Why not just calculate it as an insert trigger but only look at the current day and have a table that stores a running total per item/day. That way you never ha
by olefoo 18y ago
Why not just calculate it as an insert trigger but only look at the current day and have a table that stores a running total per item/day. That way you never have to go back to calculate days that are done.
And yes, this is more expensive up front, since you're taking a hit per insert; but your data base is always current.