I have a project which, in essence, is a batch of computations. It depends on quite a few parameters that, while they are not constants (they might change over time) there is no way they are going to change in the batch context.
To make myself clear, think of VAT rate: it might change over time, but when one closes an accounting period, it behaves like a constant on what concerns the closing itself.
Because these parameters are all over the place, I would like to find a way to limit DB lookup as much as possible. Ideally, I would implement a DETERMINISTIC function, but, this is out of the question - as suggested by relative documentation.
Any ideas / suggestions?
Thank you in advance.
EDIT: Keep also in mind that these values are stored in database - as we may keep VAT rate so that we may know its value at a given point in time. Though it wouldn't be expected, it is possible that a batch concerning some previous period will run again - and will need to know the value of its parameters as they were then.
The benefit of a DETERMINISTIC function is that, given the fact that it produces consistent results (same input always gives the same output) is what I would do if these values were constants and I wouldn't want to keep track of them. But the documentation states clearly that, if a function does db lookups, it must never be DETERMINISTIC.