Indexes to improve tag history performance

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?

1 Like

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.