# Historical Data Duplicate T\_Stamp Primary Key

**URL:** <https://forum.inductiveautomation.com/t/historical-data-duplicate-t-stamp-primary-key/85336>\
**Category:** Ignition\
**Created:** [February 7, 2024, 12:13am UTC](https://forum.inductiveautomation.com/t/historical-data-duplicate-t-stamp-primary-key/85336 "2024-02-07T00:13:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben.Mehmet](https://avatars.discourse-cdn.com/v4/letter/b/58956e/32.png) [@Ben.Mehmet](https://forum.inductiveautomation.com/u/Ben.Mehmet)\
**Post date:** [February 7, 2024, 12:13am UTC](https://forum.inductiveautomation.com/t/historical-data-duplicate-t-stamp-primary-key/85336/1 "2024-02-07T00:13:43Z")

</div>

Hi,  
We are getting a lot of data stuck in Store & Forward with a 'duplicate entry for primary key'. For example here is an example data entry:

 ![storenforward_data](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/747c634525ed3148f7e78c617d4f7b545fc39c3e.png)

Looking at one of the points:  
value path="Fields/Slade Park/Is Connected" datatype="0" mode="0" timesource="1" timestamp="2024-01-28 22:28:58.927" quality="192"\>true

Millisecond timestamp = 1706441338927  
Tagid = 32309: found from query:

 ![tag id query](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/9395b3a4514018949ce1e6113fa95c320883ffd7.png)

If I query the historic table (for jan) the last entry we got has the timestamp: 1706440570890 ( 2024-01-28 22:16:11.890 AEDT)  
 ![most recent data](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d1cb1491a1cd0c886ab0258e9125c4324d6c3794.png)

If I search the table for that t\_stamp it wont return any values:

![timestamp search query](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c8d69cd27219babf9fe755b1e95135a831b060ab.png)

So I'm not sure why the data isn't being recorded when there doesnt seem to be any entries with that timestamp (or tagid).  
This has caused a major problem as trends now show the value has still 0 (because the state hasn't changed since).

Maybe I'm missing something about the storing/conversion of timestamps ?  
Is there another reason the value isn't being added ? Or does every value in the dataset need to be unique for all data to be inserted ?

Thanks,  
Ben
