# Historical tag

**URL:** <https://forum.inductiveautomation.com/t/historical-tag/9139>\
**Category:** Ignition\
**Created:** [October 3, 2014, 12:01pm UTC](https://forum.inductiveautomation.com/t/historical-tag/9139 "2014-10-03T12:01:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HALW80](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@HALW80](https://forum.inductiveautomation.com/u/HALW80)\
**Post date:** [October 3, 2014, 12:01pm UTC](https://forum.inductiveautomation.com/t/historical-tag/9139/1 "2014-10-03T12:01:21Z")

</div>

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

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5f7283816708ac3d1aa1c5e60f4e2d0b06504979.png)

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 8, 2014, 8:13pm UTC](https://forum.inductiveautomation.com/t/historical-tag/9139/2 "2014-10-08T20:13:20Z")

</div>

Hi,

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.

Regards,

---

<div class="post-metadata">

**Author:** ![HALW80](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@HALW80](https://forum.inductiveautomation.com/u/HALW80)\
**Post date:** [October 15, 2014, 2:05pm UTC](https://forum.inductiveautomation.com/t/historical-tag/9139/3 "2014-10-15T14:05:17Z")

</div>

v7.6.4

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 15, 2014, 3:45pm UTC](https://forum.inductiveautomation.com/t/historical-tag/9139/4 "2014-10-15T15:45:29Z")

</div>

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/](http://www.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.

Regards,

---

<div class="post-metadata">

**Author:** ![HALW80](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@HALW80](https://forum.inductiveautomation.com/u/HALW80)\
**Post date:** [October 16, 2014, 2:17pm UTC](https://forum.inductiveautomation.com/t/historical-tag/9139/5 "2014-10-16T14:17:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 16, 2014, 5:17pm UTC](https://forum.inductiveautomation.com/t/historical-tag/9139/6 "2014-10-16T17:17:50Z")

</div>

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.

Regards,
