Database normalization is the most efficient / least redundant way to store data. This is good for transaction processing, but often directly conflicts with the need to efficiently receive data again. Usually the problem is solved by creating tables (indexes, materialized views, drive tables ...) with more accessible, pre-processed data. The (slightly dated) buzzword here is Data Warehouse.
I think you want your page table to be normalized, but you have an extra table with totals. Depending on how recent these calculations should be, you can update the table when updating the original table, or you may have a background setting for periodically recalculating the totals.
You also want to do this only if you are really faced with a performance problem that you will not, if you do not have a very large number of records or a very large number of concurrent accesses. Keep your code flexible so you can switch between a table and not have one.
source share