# Tag Historian Compress

**URL:** <https://forum.inductiveautomation.com/t/tag-historian-compress/51347>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [September 26, 2021, 2:31am UTC](https://forum.inductiveautomation.com/t/tag-historian-compress/51347 "2021-09-26T02:31:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![monc](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@monc](https://forum.inductiveautomation.com/u/monc)\
**Post date:** [September 26, 2021, 2:31am UTC](https://forum.inductiveautomation.com/t/tag-historian-compress/51347/1 "2021-09-26T02:31:17Z")

</div>

Hello,

We have a historical table that’s growing really fast. It’s only 2 and half months but the data is already at 75GB. Is there a way to compressed the tag historian table data?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b391a8906cfec07c677c3afe29297caaff6bf9d9.png)

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [September 26, 2021, 3:23am UTC](https://forum.inductiveautomation.com/t/tag-historian-compress/51347/2 "2021-09-26T03:23:35Z")

</div>

From the Ignition side you must check the history scan class for tags, the size of data is too big, means you are storing a lot of variables way to fast.  
Anyway, what comes to my mind is to reduce the partition size, seems like you have a 2 months partition. In your case I would try 1 weeks partition for example.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/1/b12f39c1ab0e722db00af4fd51c16ca5cb13711a.png)

Also enable pruning

---

<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 26, 2021, 3:39am UTC](https://forum.inductiveautomation.com/t/tag-historian-compress/51347/3 "2021-09-26T03:39:09Z")

</div>

The Tag Historian, like in most SCADA packages, offers two key advantages:

- Configuration convenience. Just check a box and the defaults will record your tag. The database tables are structured to accommodate any number of tags in any hierarchy, by storing just one sample from one tag at one timestamp in its own row. (AKA “tall” format.)
- Storage savings for tags that don’t change often (boolean events, perhaps) or normally change very little around an otherwise stable value. The latter depends on a little more configuration, where someone knowledgeable about the process sets an appropriate deadband and possibly a minimum time between samples.

The alternative old-school format is to create tables specifically for groups of tags, and record them together in single rows (AKA “wide” format). In Ignition, this would typically be done with Transaction Groups, part of the SQL Bridge module. For tags that are constantly changing, or must be recorded at constant intervals, wide format is _ **much** _ more space-efficient.

Unfortunately, failing to set deadbands and appropriate intervals for noisy tags will make your Tag Historian record a great deal more data than you likely need. When auditing your tags for appropriate history settings, you should do so in light of [Ignition’s analog value compression algorithm](https://docs.inductiveautomation.com/display/DOC81/Configuring+Tag+History#ConfiguringTagHistory-DeadbandandAnalogCompression).

---

<div class="post-metadata">

**Author:** ![monc](https://avatars.discourse-cdn.com/v4/letter/m/48db29/32.png) [@monc](https://forum.inductiveautomation.com/u/monc)\
**Post date:** [September 26, 2021, 5:03am UTC](https://forum.inductiveautomation.com/t/tag-historian-compress/51347/4 "2021-09-26T05:03:33Z")

</div>

It seems we’re doing wrong on configuring our tag history.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/3/a31a6b3f4c0e127078f49916a8b514139f0b77ec.png)

What we think here is that this tag only stores data on every tag change, is that correct?  
If not, can you explain how much data this tag is storing on tag historian table?  
and also this is an analog tag (power meter kwh)

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 26, 2021, 4:47pm UTC](https://forum.inductiveautomation.com/t/tag-historian-compress/51347/5 "2021-09-26T16:47:14Z")

</div>

Based on your setting it will store new data everytime the value changes 0.01. So of you are doing kwh so you need that resolution? Usually having the dead and too low will end up logging a to more data then you really need.
