# Sqlth\_te

**URL:** <https://forum.inductiveautomation.com/t/sqlth-te/3681>\
**Category:** Ignition\
**Created:** [December 1, 2011, 7:38am UTC](https://forum.inductiveautomation.com/t/sqlth-te/3681 "2011-12-01T07:38:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [December 1, 2011, 7:38am UTC](https://forum.inductiveautomation.com/t/sqlth-te/3681/1 "2011-12-01T07:38:43Z")

</div>

Hi

I have few duplicated tags in my sqlth\_te table and if I move or change name of tags will get more of these?  
Some of the tags is retired but some are just duplicated?

How ignition should “clean” this table or is there any easy way to update index?

I am using sqlth\_te table a lot of my dynamic trends, reports and graphics and it is working as expected but these duplicated records makes some errors.

Br  
Tommi

---

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [December 1, 2011, 10:00am UTC](https://forum.inductiveautomation.com/t/sqlth-te/3681/2 "2011-12-01T10:00:19Z")

</div>

Hi

Also noticed that if changing any historical parameters I get new ID:s on sqlth\_te table.  
This will cause broken historical link.?  
Can I prevent this anyhow?

Tommi

---

<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:** [December 1, 2011, 4:52pm UTC](https://forum.inductiveautomation.com/t/sqlth-te/3681/3 "2011-12-01T16:52:57Z")

</div>

Hi,

No, new entries don’t break the historical tag. When the system queries, it looks at all ids for a given tag path, and pulls all of the data together. In 7.3, new “created” and “retired” columns were added to make this more efficient, so that the system doesn’t need to look for data for ids where there definitely wouldn’t be any.

Better maintenance of this table is a big outstanding feature request. When you rename tags, or move them, unfortunately the system cannot track that and update the table. You end up with additional entries with different tag paths, which are basically like new tags.

If you rename or move a tag, the easiest thing to do is to change the tagpath column of the old tag to be correct. If using 7.3, you should set the “retired” column equal to the “created” column of the new entry. When you query, the system will read the data for all of the appropriate ids.

Regards,
