Historical tag

I have created 2 historical tags… daily and yest
The daily tag when I search the sqlth_te has 7 entries with tagid and none retired while the yest tag is not showing up at all even though the tag is selected for tag history
attached a screenshot as an example


What version is this? I feel like I remember something that might have lead to this, and believe it was fixed in 7.7.1. However, we can keep troubleshooting if that’s what you’re currently using.



How much is this happening? Upgrading to 7.6.7 is probably a good place to start. Quite a bit was fixed between 7.6.4 and 7.6.6, at least, though I can’t say right away that this was.

You can find 7.6.7 by going to Downloads>Archived Downloads.

Is data currently being stored for the highest id? This situation shouldn’t affect storage much, but could make querying less efficient, so ideally, we could mark the unused ids as retired. One slightly drastic approach might be to upgrade, and while the service is stopped, mark all tags whose retired=null to the current time (unixtimestamp.com/, multiply the number by 1000). That way, the server will create new tag ids when it starts up. From that point on, it should only have 1 id, so any queries from that point forward will be more efficient. If the query range spans back to the older time, it will try to use all of the old ids.


Yes its does log on the highest id.
Will upgrade the next time I am site.

I’m not sure how many tags you have with this situation (you could try: “select count(*), tagpath from sqlth_te where retired is null group by tagpath” to see), but if it’s only a few, you could set the retired column of all but the highest id to the created time of the highest id.

If the data is storing, you just want to set the retired column of the unused paths in order to improve query efficiency.