Data types - which one should I use?

a brief summary of the datatypes

  • phpfina
    is the default type and it offers faster manipulation in graphs etc due to the fixed intervals allowing for the timestamps to be calculated by number of datapoints rather than queried and handled as another data field. It can also reduce the size on disk of regularly collected data but it’s size will grow relative to time passed and interval size, not in relation to the data captured. eg a 10s fixed interval will record 8640 datapoints a day even if the value is only upadted once a week.
  • phptimeseries
    This is the recommended variable interval feed, it records the time and the value at each update, the timestamp doubles the size and slows it down a little but it’s ideal for irregular updates and it is far more accurate than the fixed interval feeds and IMO it is the best way to faithfully store your data.
  • phpfiwa
    has been or is most likely to be depreciated, it is a multi layer version of the PHPfina
  • Mysql
    was predominantly used for the daily totals in recent years, they are being phased out so mySQL feeds will become scarcer, but mySQL is a very universal database so it’s unlikely support will ever disappear completely especially as all the emoncms settings are also managed in mySQL.

The bottom line is you really only need to choose between fixed or variable interval unless you have a specific need that isn’t covered by the phpfina or phptimeseries. I prefer variable over fixed because once you alter the data to conform to a fixed interval it cannot be undone and I do a lot of debugging/analysis where the individual timestamps are more important than a light and fast dataset, plus I have plenty of harddrive disc space. I do add phpfina feeds for use with the apps and also for any feeds used predominantly for graphing.

2 Likes