# Indexes to improve tag history performance

**URL:** <https://forum.inductiveautomation.com/t/indexes-to-improve-tag-history-performance/96052>\
**Category:** Ignition\
**Created:** [September 17, 2024, 7:29am UTC](https://forum.inductiveautomation.com/t/indexes-to-improve-tag-history-performance/96052 "2024-09-17T07:29:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joel\_Farley](https://avatars.discourse-cdn.com/v4/letter/j/f08c70/32.png) [@Joel\_Farley](https://forum.inductiveautomation.com/u/Joel_Farley)\
**Post date:** [September 17, 2024, 7:29am UTC](https://forum.inductiveautomation.com/t/indexes-to-improve-tag-history-performance/96052/1 "2024-09-17T07:29:31Z")

</div>

Found myself looking at the sql tables of the tag history directly to get a little bit more information than what can be provided through trend graphs.

Wondering what indexes could be put in to improve the performance of these types of queries? Perhaps an indexing sqlth\_te on `tagpath` and including `id` to speed up my search for history by my known tag path?

Has anyone done this to much success? Is there anything about how these tables or built in tag history functions work that I should know before trying something like this?

---

<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:** [September 17, 2024, 1:43pm UTC](https://forum.inductiveautomation.com/t/indexes-to-improve-tag-history-performance/96052/2 "2024-09-17T13:43:11Z")

</div>

Ignition should be creating the necessary indices. But sometimes things get screwed up. You definitely should have indices on timestamp and tag ID in the data partitions, and on the provider/driver/path columns in the metadata.
