# Disappearance of historical data

**URL:** <https://forum.inductiveautomation.com/t/disappearance-of-historical-data/67490>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 12, 2022, 10:40am UTC](https://forum.inductiveautomation.com/t/disappearance-of-historical-data/67490 "2022-12-12T10:40:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergei\_Kitov](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@Sergei\_Kitov](https://forum.inductiveautomation.com/u/Sergei_Kitov)\
**Post date:** [December 12, 2022, 10:40am UTC](https://forum.inductiveautomation.com/t/disappearance-of-historical-data/67490/1 "2022-12-12T10:40:08Z")

</div>

Hello, during the DNP3 check, the following problem occurred:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/f/6f19126c5a7e35eb96e660f3de69eabb085af29c.jpeg)

~ 2:02:00 PM there was a connection break, then at 2:23:52 PM the connection was restored. Data was pulled from the buffer until 2:31:47 PM. While the buffer is being emptied, we do not receive data for the history. The graph shows this as a flat line. At the same time, the value and timestamp change.  
Tag Settings:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/021a3ccb3622c6b61e0c2f10e9724f58326e163a.png)

Tag Group:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5d05431d3c2be736164da80a839c16f91ce514bb.png)

Thanks

PS:

We noticed that a value appears during data collection. The timestamp of this value is larger than the ones that are unloaded next.

As an example: 8:30:14, 8:31:08, 8:30:16. The time 8:31:08 corresponds to the end time of the buffer loading into the history.

Video speed x0.5

[https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/c/8ccb1b48d9b24c3e43575b6e1ec8cb386aab11f0.mp4](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/c/8ccb1b48d9b24c3e43575b6e1ec8cb386aab11f0.mp4)

---

<div class="post-metadata">

**Author:** ![Simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Simen](https://forum.inductiveautomation.com/u/Simen)\
**Post date:** [December 14, 2022, 10:51am UTC](https://forum.inductiveautomation.com/t/disappearance-of-historical-data/67490/2 "2022-12-14T10:51:41Z")

</div>

Can you post the data from your history database from around the time the value flatlines?  
There is a know issue with history, deadband and charts when you have loss of connection.

`SELECT *, from_unixtime(t_stamp/1000) as time FROM sqlt_data_XXXX where tagid = XXX and t_stamp order by t_stamp DESC`

replace sqlt\_data\_XXXX and tagid number with your database and tagid.

---

<div class="post-metadata">

**Author:** ![Sergei\_Kitov](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@Sergei\_Kitov](https://forum.inductiveautomation.com/u/Sergei_Kitov)\
**Post date:** [December 15, 2022, 9:52am UTC](https://forum.inductiveautomation.com/t/disappearance-of-historical-data/67490/3 "2022-12-15T09:52:13Z")

</div>

Thanks for the hint.  
Executed the following query in MSSQL:

> SELECT TOP (1000) [tagid]  
> ,[intvalue]  
> ,[t\_stamp]  
> ,dateadd(s,[t\_stamp]/1000,'01-01-1970') as ctime  
> FROM [History].[dbo].[sqlt\_data\_1\_20221209]  
> where tagid = 1 and t\_stamp between 1671096477000 and 1671096614000
> 
> order by t\_stamp desc

Received the following response:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/9/09cfce73dfae4a0292bdb6375bf06a10f42681bf.png)

The values change every second. From this table it can be seen that there is no data for 2 minutes. On the graph, this data shows flat.

---

<div class="post-metadata">

**Author:** ![Simen](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@Simen](https://forum.inductiveautomation.com/u/Simen)\
**Post date:** [December 15, 2022, 10:40am UTC](https://forum.inductiveautomation.com/t/disappearance-of-historical-data/67490/4 "2022-12-15T10:40:41Z")

</div>

The dataintegrity colom is the most interesting part here, and its missing from your response.  
Would also be more interesting if we could see the data from the timeperiod you posted first, December 12, 02:00-02:35

If dataintegrity is 0, then the intvalue in the database will not be taken into account on the chart(this is stupid), but it will use the timestamp, and create a flat line from the **previous** entry in the database.

Then from the entry where data integrity is 0 to the **next** entry, there will be a line break in the chart, if this option is turned on. This is fine, because you have a loss of communication here.

I wrote a post trying to explain my findings here:  
[[[FEATURE] Increase usability of the Perspective Power Chart component - #57 by Simen](https://forum.inductiveautomation.com/t/feature-increase-usability-of-the-perspective-power-chart-component/51474/57)]
