When working with data values, should I create a single table storing the hourly values, and also the aggregated daily/monthly values, or should I create separate tables for these?
I'd imagine multiple tables would be the way to go, but I'm a complete amateur here. It sounds like something that would improve performance and possibly maintenance, but I'd also like to know if this even makes a difference. In the end, having 3-4 tables vs 1 could also cause some maintenance issues I would imagine.
So basically, a values_table containing:
id value datetime range
1 33 2022-05-13 11:00:00 hourly
2 54 2022-05-13 12:00:00 hourly
3 840 2022-05-13 daily
...
vs
hourly_values_table containing:
id value datetime
1 33 2022-05-13 11:00:00
2 54 2022-05-13 12:00:00
...
And a daily_values_table containing:
id value datetime
1 840 2022-05-13
...
What would be the proper way to handle this?