Computing values on the fly vs decrementing bucket contents Imagine you have an employee database and a table for each employee which contains their start date.  There are other tables which describe their vacation allowances based on role, seniority and month of hire.  There is also a table which contains the vacation used for each employee.

The question:

From a general, balanced perspective of performance and ease of code and maintenance, is it better to compute an employee's vacation balance by evaluating all the table data or to store the available vacation in buckets which are then adjusted as vacation is taken.  

It seems to me the overhead and complexity of calculating the available vacation, then computing the vacation which has been taken is unnecessary and a more efficient and graceful solution would be to create a table which holds the available vacation, populate it at the beginning of the year and decrement it as vacation is taken.
Computers don't get tired.

Nobody has so many employees that the summation over a well-indexed set of rows of vacation actually taken would grind their servers to a halt.

What is a problem is precalculated data getting out of whack with respect to your raw transactional data.  If you're tracking vacation you're going to need to keep a list of days taken no matter what, for audit purposes, if nothing else.  What happens if an employee challenges your calculation of their vacation taken?  The only way you'll be able to justify your number is to go back and show the details.

Since you'll already have the transactional details, there's not much point in keeping a precalculated sum of these details.

From a code complexity/maintenance standpoint you're not really saving anything.  You write the code that calculates the remaining vacation entitlement once.  It's a single select statement that has three or four more keywords in it than the single select statement that would read a precalculated row.  That's not much of a savings.

What you're thinking about is often called pre-optimization and it's something to be avoided, because it actually makes things worse more often than it makes things better.