What's the best practices for daily, Monthly, Yearly report

i have a use case for KWH consumption and syrup consumption for one process. Data historized in ignition normally . We need to generate report for Hourly consumption, daily consumption, Monthly consumption and Yearly consumption .

it's ok to use the

system.tag.queryTagHistory

to get the data . Client asked 5 years data mean he can be back to year four and look to reports this will be problem with performance .

We think in two solution.
1- Create custom table "Consumption" run schedule script hourly to get the data and insert to that table which will be used for reports later.
2- create stored procedure(SP) which will manage the aggregation and inserted into Custom table "Consumption".
i would like to get your inputs on this approach specially we are dealing with more than 3000 meters need for reports . And more than 5000 tags in historian but will not be part of reports.

You need a Fact Table in a Star Schema in a Data Warehouse.
(Those should be specific enough search terms to consume your weekend... or go ahead and get The Data Warehouse Toolkit from your favorite bookstore... that is going to be the Best Practice for sure. There are other ways to do it that aren't a Best Practice of course.)