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.