# Historian Table Partitioning

**URL:** <https://forum.inductiveautomation.com/t/historian-table-partitioning/19155>\
**Category:** Ignition\
**Created:** [August 8, 2018, 8:24pm UTC](https://forum.inductiveautomation.com/t/historian-table-partitioning/19155 "2018-08-08T20:24:46Z")\
**Posts on this page:** 1\
**Showing post:** 12

<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:** [August 21, 2018, 10:30pm UTC](https://forum.inductiveautomation.com/t/historian-table-partitioning/19155/12 "2018-08-21T22:30:20Z")

</div>

I haven’t had to optimize the Historian, as I don’t ever put millions of rows in it. /-: But I’d start with studying all of the indices on the tables to make sure the queries are optimizable and optimization statistics are present. I would make sure there is a [BRIN index](https://www.postgresql.org/docs/9.5/static/indexes-types.html) on the t\_stamp column, and a separate b-tree index on the tag id column. Recommended indexing would vary with DB brand, of course. Larger partitions should be tolerable with proper indices.

The [EXPLAIN ANALYZE …](https://www.postgresql.org/docs/9.5/static/sql-explain.html) command will show you what the optimizer decides and how well it works. I wouldn’t use anything older than PostgreSQL 9.5.

---

_[View the full topic](https://forum.inductiveautomation.com/t/historian-table-partitioning/19155)._
