efficemcy question: Add a field or use a function
843854Apr 6 2005 — edited Apr 6 2005I have a table with information about employees. Each empl receives a salary and I need to show the cumulated salaries over a period of time - for every employee.
so imagine this, every time you ignite the program you see a list of empls (100+) and their cumulated salaries.
Question: Should I add a column cumulatedSalary to the table (and every time an empl recieves a salary - add it to the comulted field) or simply to use the SQL aggregate function to sum up all empl's salary.
What is more efficient?