# Huge data in sqlth\_sce, Stale Data Detection how to prune records after turn of Stale Data Detection

**URL:** <https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 22, 2024, 4:55am UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721 "2024-05-22T04:55:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lina\_Su](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@Lina\_Su](https://forum.inductiveautomation.com/u/Lina_Su)\
**Post date:** [May 22, 2024, 4:55am UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721/1 "2024-05-22T04:55:01Z")

</div>

Does anyone know what is purpose for this table sqlth\_sce.  
There are over 90,000 records in my table.  
And for some scid, it's over 40,000 lines.  
When I check my database log, it keep updating this table and give performance issue.

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

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 22, 2024, 7:16am UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721/2 "2024-05-22T07:16:32Z")

</div>

**sqlth\_sce** This table stores start and end times for tag groups.

See [Ignition Database Table Reference | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/reference-pages/ignition-database-table-reference#sqlth_sce).

---

<div class="post-metadata">

**Author:** ![Lina\_Su](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@Lina\_Su](https://forum.inductiveautomation.com/u/Lina_Su)\
**Post date:** [May 22, 2024, 3:56pm UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721/3 "2024-05-22T15:56:50Z")

</div>

The problems I am facing with is there are lots of deadlocks and slowness of my system, so I am trying to find the reason, so I look at this table sqlth\_sce .

I find below document , this may relate with my deadlock issue. I turned off off Stale Data Detection following below instructions.

But there are still 94285 records of this table , sqlth\_sce ,

**how to prune those records.**  
**Can I just delete it, what would be the impact.**

[Ignition Historian Guide | Ignition User Manual (inductiveautomation.com)](https://docs.inductiveautomation.com/docs/8.1/tutorials/ignition-historian-guide#tag-historian-using-sql-databases)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 22, 2024, 4:05pm UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721/4 "2024-05-22T16:05:32Z")

</div>

> [@Lina\_Su](#):
>
> Can I just delete it, what would be the impact.

You would likely lose some of your history. The extra records likely need to be _ **conditionally** _ pruned. Consider asking support to look at your situation. IIRC, there was a bug recently fixed that would produce extra records in `sqlth_sce`. You might be affected.

---

<div class="post-metadata">

**Author:** ![Lina\_Su](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@Lina\_Su](https://forum.inductiveautomation.com/u/Lina_Su)\
**Post date:** [May 24, 2024, 8:24am UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721/5 "2024-05-24T08:24:46Z")

</div>

May I ask which vision this bug is fixed in ?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 24, 2024, 9:30am UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721/6 "2024-05-24T09:30:01Z")

</div>

I don't see anything in the change logs for this, but there are quite a few posts on this topic in the forum. Perhaps one of them will be helpful to you:  
[Forum Search: sqlth\_sce](https://forum.inductiveautomation.com/search?q=sqlth_sce%20order%3Alatest)

---

<div class="post-metadata">

**Author:** ![Lina\_Su](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@Lina\_Su](https://forum.inductiveautomation.com/u/Lina_Su)\
**Post date:** [May 27, 2024, 12:54am UTC](https://forum.inductiveautomation.com/t/huge-data-in-sqlth-sce-stale-data-detection-how-to-prune-records-after-turn-of-stale-data-detection/90721/7 "2024-05-27T00:54:54Z")

</div>

For whom might meet with same issue.

There is no dead lock after I turn off Stale Data Detection and delete data in sqlth\_sce .
