What Causes a History Tag to be Retired

Tags should be retired in sqlth_te when the associated realtime tag is disabled, deleted, or has history turned off. Unfortunately, there was a bug with this behavior (fixed in a fairly recent version) so it’s possible you’re looking at older records that will not retroactively retired, or even that you’re still on an affected version.

Regardless, non-retired entries in sqlth_te have only cosmetic impact - unless you’re getting to truly ridiculous _te record counts (ie, millions) scanning the _te table is not going to cause historian performance problems.