# Manually clean up sqlth\_te table?

**URL:** <https://forum.inductiveautomation.com/t/manually-clean-up-sqlth-te-table/93251>\
**Category:** Ignition\
**Created:** [July 15, 2024, 6:27pm UTC](https://forum.inductiveautomation.com/t/manually-clean-up-sqlth-te-table/93251 "2024-07-15T18:27:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [July 15, 2024, 6:43pm UTC](https://forum.inductiveautomation.com/t/manually-clean-up-sqlth-te-table/93251/2 "2024-07-15T18:43:54Z")

</div>

I've had to manually excise just portions of data before; wholesale deletion should be relatively easier.

Get familiar with the following schema reference, and probably good to take a backup before you start deleting anything:

> **[Ignition Database Table Reference | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/reference-pages/ignition-database-table-reference#tag-history)**
>
> Ignition has a lot of systems built-in that will query the database automatically without requiring you to build a query. These systems automatically create the necessary tables in the database, insert the relevant data, and even query it back out...

EDIT: some interesting considerations in case you plan to also remove the actual data and not just the sqlth\_te entries:

> [@History data table clean on tag deletion?](https://forum.inductiveautomation.com/t/history-data-table-clean-on-tag-deletion/35360):
>
> Does anyone have a procedure that they have developed to ‘clean up’ the sqlt\_data\_ tables if and when history configuration is dropped for a tag? We are going to either stop collecting on a significant number of tags or remove the tags entirely. I would like to remove the history table entries for those tags. We do not ‘prune’ our history per se by date that is to say we are keeping our history indefinitely. An example of an SQL query that takes the old tag name as a parameter and then drops the…

---

_[View the full topic](https://forum.inductiveautomation.com/t/manually-clean-up-sqlth-te-table/93251)._
