I’m looking for a simple way to identify which tags log the most data to the historian. This is for a large system, north of 10k historian tags.
It’s easy enough to spot check an individual tag using system.tag.queryTagCalculation() and get a count for a time range. For instance, I can check if a tag logs 2 values/hour or 2000 values/hour and adjust history configurations accordingly. I could take it a step farther and iterate through all of my tags, but this feels like a messy approach (not to mention would take a good long while to run).
Does anyone have a more comprehensive or efficient method that’s worked for them? Perhaps something that can be run as a report or query?
For outside of the database, you could use, system.tag.browseHistoricalTags in conjunction with system.tag.getConfiguration to build a report of tags and sample rates.
You could even automate making the change with system.tag.configure but that might be a little too hands off.
SELECT tagpath, count(tagid) as counts
FROM [sqlth_1_data]
inner join [sqlth_te] on [sqlth_1_data].tagid = [sqlth_te].id
group by tagpath
order by counts desc