Hello, I read couple documents for recording data and trending it, I am looking for best practices for recording data and storing data to DB the way that it's most effective. Are there any best practices that I should follow? Like difference between tag recorded and Tag history stored. Or Can I use same tag group to record tag and history both ?
I tried On Change and behavior was very weird, It was not recording value 0 for some reason but now I have changed it to Tag group but not sure which one to select for best result.
Thanks
I would say that Tag Group is better if you want an efficient storage rate. Basically, Tag Group will make sure your tags do not store any faster than the group rate.
For example. The default historical rate is 10 seconds and the default polling rate is 1 seconds. So even though the tag is changing every second, the history is only evaluated every 10 seconds.
On Change would actually be evaluating history every time the tag updates which could add a lot more rows to the database.
The other part of making your tables efficient would be the deadband. I always use discrete deadband because it is an easy algorithm to understand and it does not have strange behavior trying to render the trend on the screen.
TLDR. On Change will help give you the most detail. Tag Group will help give you the best efficiency. I don't recommend Periodic as it means you have a specific poll rate for just one tag.
1 Like
Yea I have noticed some weird behavior on some On Change tags as well so I would guess it's just a bug with the Sample Mode. The problem was fixed for me when changing the the tags to Tag Group and leaving them like that.
This answer was exactly what I wanted. Thanks Brandon. and Markus, On change is so screwed up. I would never use that. I was thinking to use On change with dead band but as Brandon mentioned, Better way to use Tag group with discrete deadband.
Thank you
1 Like