events - is it possible to write the sum of one column into a new dataset of the same table every hour by a routine only with mysql? -
for smart metering application aggregate counter data every hour.
for query 'select sum(value) gascounter data channel_id=8' gives actual counter value.
for display task need data of channel 25 every hour in same table 'data'. therefor have add dataset , put valid unix-timestamp in field 'timestamp' , sum value in field 'value'.
all must done every hour.
can mysql using routine?
what right routine sql? how create routine? how trigger done routine executed everx hour?
i need on this!
thank you!
create procedure process need make middleware happy , use event scheduler call procedure every 1 hour.
Comments
Post a Comment