# Sqlth\_te Duplicates BUG

**URL:** <https://forum.inductiveautomation.com/t/sqlth-te-duplicates-bug/5314>\
**Category:** Ignition\
**Created:** [October 23, 2012, 5:37pm UTC](https://forum.inductiveautomation.com/t/sqlth-te-duplicates-bug/5314 "2012-10-23T17:37:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phoulihan](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@phoulihan](https://forum.inductiveautomation.com/u/phoulihan)\
**Post date:** [October 23, 2012, 5:37pm UTC](https://forum.inductiveautomation.com/t/sqlth-te-duplicates-bug/5314/1 "2012-10-23T17:37:32Z")

</div>

I have a problem with the duplicates created by the Gateway into the sqlth\_te table. If I edit a tag with Historian on it will create a new instance of the tag in the DB every time the value changes.  
The only way to stop this behavior is to stop and start the gateway. If left unchecked it will not stop, meanwhile it is NOT logging to the sqlth\_1\_data table for this tag. I went to the beta 4 version as suggested in the forum but it has not corrected the issue.

Your assistance here would be greatly appreciated as I do not have a work around for editing the tags without this problem. I reference the sqlth\_te table and need it to be accurate and not filled with incorrect id’s and path references.

V = 7.5.4-beta4  
This is 24 hours of duplicates:  
Tagpath Duplicates  
site/rcv/a/ln/cd/\_outs/out1 2600  
site/flt/srt/ch/f74/full\_timer 2408  
site/rcv/a/ln/ef/\_outs/out1 2366  
site/rcv/a/ln/ab/\_outs/out1 1818  
site/mod/b/srt/mrg/\_outs/out1 1524  
site/flt/srt/ch/f33/full\_timer 1268  
site/mod/b/srt/mrg/\_ins/in1 1198  
site/rcv/a/ln/tshp/\_outs/out1 1020  
site/flt/srt/ch/f27/full\_timer 816  
site/flt/srt/ch/f34/full\_timer 744  
site/flt/srt/ch/f36/full\_timer 512  
site/flt/srt/ch/f38/full\_timer 484  
site/flt/srt/ch/f79/full\_timer 420  
site/flt/srt/ch/f21/full\_timer 368  
site/flt/srt/ch/f69/full\_timer 342  
site/flt/srt/ch/f28/full\_timer 202  
site/flt/srt/ch/f32/full\_timer 168  
site/flt/srt/ch/f78/full\_timer 164  
site/shp/srt/\_outs/out34 136  
site/flt/srt/ch/f81/full\_timer 108

---

<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 23, 2012, 11:30pm UTC](https://forum.inductiveautomation.com/t/sqlth-te-duplicates-bug/5314/2 "2012-10-23T23:30:54Z")

</div>

Hi,

Could you perhaps send me the results of the most recent 10 or so entries for tagpath “site/rcv/a/ln/cd/\_outs/out1”? The system looks at several parameters and inserts only if they don’t match. Looking at the most recent entries will hopefully help me track down where the problem is occurring: either some parameter is changing each time, or the system is not properly caching the recently created id, and the check is failing each time.

Also, you said that it is not logging to the data table for the tag during this time- could you check the count and most recent timestamp for tag id 0, and see if it might be logging under that? The tag id record is inserted with a special “run insert, get key” command that returns the generated id for the tag. If this command failed to return the correct key (and returned null, for example) the data would be stored under that. Along this line, which database system are you using?

Regards,
