# Removing Historian Tables

**URL:** <https://forum.inductiveautomation.com/t/removing-historian-tables/82483>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [November 29, 2023, 3:41pm UTC](https://forum.inductiveautomation.com/t/removing-historian-tables/82483 "2023-11-29T15:41:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmb6259](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jmb6259](https://forum.inductiveautomation.com/u/jmb6259)\
**Post date:** [November 29, 2023, 3:41pm UTC](https://forum.inductiveautomation.com/t/removing-historian-tables/82483/1 "2023-11-29T15:41:35Z")

</div>

Is there a best practice for removing old historian tables? I have a lot of old tables that contain data we no longer use. I would like to clean up the database and remove them, but I'm not sure if simply deleting the tables will cause any problems. These are the 'dbo.sqlt\_data...' tables.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b771c39118da19f80dcb617ed91a189ee105b9b1.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:** [November 29, 2023, 3:47pm UTC](https://forum.inductiveautomation.com/t/removing-historian-tables/82483/2 "2023-11-29T15:47:19Z")

</div>

See "data pruning" in [Tag History Providers - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Tag+History+Providers#TagHistoryProviders-DatasourceHistoryProvidersSettings).

Modify the historian setting to prune back before a certain age, wait for it to operate (I can't remember when this occurs), and then set the pruning back to a longer time, if required. This will have Ignition controlling the pruning and may be safer than you (or me) going mucking about.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 29, 2023, 4:08pm UTC](https://forum.inductiveautomation.com/t/removing-historian-tables/82483/3 "2023-11-29T16:08:01Z")

</div>

I believe deleting those tables should be pretty safe, though you should probably also remove the corresponding record in sqlth\_partitions.

But frankly, automatic pruning is probably the way to go.

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [November 29, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/removing-historian-tables/82483/4 "2023-11-29T16:50:23Z")

</div>

> [@Transistor](#):
>
> (I can't remember when this occurs)

Looks like it happens every 10 minutes but I wasn't able to find if it's on a fixed schedule or just starting from when pruning is enabled.

> [@When is data pruning triggered?](https://forum.inductiveautomation.com/t/when-is-data-pruning-triggered/11302):
>
> I enabled data pruning and set the Prune Age to 1 Month and saved the changes. Partitioning is enabled with a Partition length of 1 Month. At first the data (table partition) was not pruned, but eventually it was. I believe it was after at least 15 minutes or so after enabling pruninig. I did not record the time when I enabled pruning. This is acceptable behavior, but it still left me wondering what triggers the pruning so that I can know when to expect the data to be deleted? Is it configu…
