To envision my use case, here’s a couple of tags I have:
- machine ID
- “job type” ID
- speed float
Each “machine” has each of these tags.
“job type” and speed are currently being stored in tag history already. But I also want to do some transaction groups that store in a more columnar format so I can do something like SELECT AVG(speed) FROM data GROUP BY job_type WHERE machine_id = xyz
or something.
I realize that this is effectively duplicating the data in the tag history table(s) that ignition creates internally as well as now in a new table being written to by a Transaction Group.
Is this an acceptable way to go about it? Is there a better way that I’m overlooking?
Storage is cheap! As long as you aren’t generating tons of records it shouldn’t be an issue. However, I think you should be asking whether there is value in storing tag history for your tags. Is there anything convenient about querying tag history versus querying your own table of records?
I find that for discrete events, creating a table of records makes it much easier to store related data points. Your example seems like the perfect time to abandon the tag history system.
2 Likes
Right, thanks for the input!
For my purposes, tag history is still required, the Transaction Group is being logged every 5 minutes, but I still want tag history for being able to view a trendline of speed, for instance.