How emoncms stores and recalls historical data

Hello,

I have been using emoncms and parallel to this as a learning objective I am doing my own website to show my mysql data from my 20 nodes.

My situation is:

if I try to show historial data such as “liters per day” or “liters per month” etc, I am doing a mysql query with GROUP BY. This causes the query to take a lot of time.

I could be running a parallel script to do this and save it to another history-table but I see these problems:

  • this table would not be “live” data as any change in the node table would not be reflected in the history-table.
  • the running day, or month needs to be calculated each time it is requested as new data is still being saved.
  • the history-table would have to grow in dates and nodes as new nodes are added on-the-fly.

how does emoncms do this stuff?

Thank you very much,

This was asked not very long ago. Emoncms uses custom databases designed in-house. It is all documented here.
phpfiwa is not recommended for new use.