Troubleshooting
Cut Ignition Tag Historian growth before compressing the table
Short answer
A 75 GB Tag Historian table after 2.5 months is a sampling problem, not a compression problem. Raise analog deadbands above instrument noise, set a minimum time between samples, then shorten partitions to about a week and enable pruning. Compressing the existing table changes none of the growth rate.
On this page
A Tag Historian table at 75 GB after 2.5 months is growing at about 1 GB per day, and that is a sampling problem, not a compression problem. Compressing the table shrinks pages already written and leaves the incoming rows untouched, so it is the last move, not the first. Cut the write rate first: raise analog deadbands above instrument noise and set a minimum time between samples on tags that move continuously. Then shorten partitions to about one week and enable pruning. The Ignition User Manual itself describes the analog deadband as a compression threshold, the same idea other historian packages use, and it is the setting most often left too tight, as a power-meter kWh tag storing a row on every 0.01 change shows.
One row per tag, per timestamp, is why the table grows #
The Tag Historian stores tall-format data: one row holds one sample of one tag at one timestamp. Row count is tags times samples, so database growth tracks the rate you write, and the format itself has no fat to trim. The space savings the design does offer apply to tags that change rarely, or that wander a little around a stable value, and only when someone who knows the process sets a deadband and possibly a minimum time between samples. Defaults on noisy analogs and on running totalizers store nearly every scan.
For analog tags the manual defines the deadband as a compression threshold, in an algorithm similar to what other historian packages employ: a new row is written when the value moves beyond the deadband. A deadband tighter than the tag's noise band stores the noise, and on an accumulator that rises continuously under load, any deadband is crossed constantly. The only question is how often.
Why compression is the wrong first move #
Compression at the database engine, a shrink, or archiving the old partition acts on what is already on disk. The rows keep arriving at the same rate, backups keep carrying the bulk until rows are actually deleted, and the cause, sampling set tighter than the process or the reports need, keeps operating underneath. Growth does not stop until either fewer rows are written or old partitions are pruned.
| Lever | Where it is set | What it changes | What it does not do |
|---|---|---|---|
| Table compression | Database engine | Size of pages already stored | The incoming write rate |
| Deadband, minimum time between samples | Tag history settings on each tag | Rows written, permanently | Rows already stored |
| Partition size | Historical tag provider | Number and size of tables; clean units to drop | Total rows on disk |
| Data pruning | Provider, Data Pruning settings | Partitions older than the prune age | Anything inside retention |
| Wide-format transaction groups | SQL Bridge module | Rows per timestamp for grouped tags | Ad-hoc history on new tags |
Wide format is a real alternative for one class of tag: values that must be recorded at a constant interval and reported as a group. The trade-offs are laid out in Tag Historian vs SQL Bridge storage for a short-term trend database, and the decision rule is simple: grouped, fixed-interval tags can go wide; event-driven and deadband-friendly tags stay in the historian.
Decision: fix sampling first, partitions and pruning second, compression last if ever.
The kWh tag at a 0.01 deadband: the arithmetic #
The 75 GB and the 2.5 months are the case in front of you; the load below is illustrative. Take the meter averaging 200 kW:
- Energy accrues at 200 kW, that is, 200 kWh per hour.
- A 0.01 kWh deadband stores a row per 0.01 kWh of accumulation: 200 kWh/h ÷ 0.01 kWh = 20,000 rows per hour, × 24 = 480,000 rows per day, × 30 ≈ 14.4 million rows each month, from one tag.
- If energy is reported hourly, a 0.5 kWh deadband gives 200 ÷ 0.5 = 400 rows per hour, × 24 = 9,600 per day, × 30 = 288,000 monthly: 50× fewer rows, and the 200 kWh the accumulator moves each hour still lands as 400 stored true readings.
- A 60-second timed sample instead gives 60 rows per hour, × 24 = 1,440 per day, × 30 = 43,200 monthly: about 333× fewer.
- Plant level: 75 GB ÷ 75 days ≈ 1 GB per day. Cut the top writer's oversampling and daily growth falls by that tag's share of the rows. No compression setting does this.
Decision: with hourly or shift energy reporting, set the kWh tag to a 0.5 kWh absolute deadband or a 60-second timed sample. Keep 0.01 only if billing or a documented power-quality requirement needs 0.01 kWh resolution; an hourly or shift report does not resolve it.
Find the tags writing the most rows #
- Read the history scan class assigned to each historized tag; a fast class across many tags multiplies volume before any deadband is consulted.
- Query the history tables for row counts by tag id over a recent week, sorted descending; in most plants the top handful of tags dominates the total.
- Map the ids to tag paths with the historian's tag mapping table, then read each heavy tag's deadband mode, deadband value, and any minimum sample time.
- For each heavy tag, write down the smallest change a report has to resolve. Anything below that is noise you are paying to store.
Fix the write rate first #
- Raise the deadband above the noise band and below the smallest change that matters. A pressure tag wandering ±0.2 bar at steady state stores that wander under any deadband below 0.4 bar; set 0.5 bar if reports resolve 0.5 bar.
- Set a minimum time between samples on integrators and other continuously moving tags, matched to the reporting period: 60 seconds against hourly energy reports.
- Move constant-interval tags to timed sampling or to wide-format groups; leave on-change tags alone.
- Re-check the per-tag row counts after a week and expect the heavy tags to fall by the factors computed above.
Shorten partitions and enable pruning #
This case looks like one partition holding roughly two months, everything written so far. Partition size does not delete anything; it sets the unit pruning can drop. Set it to one week on the Historical Tag Providers page, reached in the Gateway's Configure section under Tag > History, the path the 7.9 manual documents. On that provider page, check Enable data pruning in the Data Pruning section and set the prune age; provider configurations can also carry a Maximum Row Count per Partition target alongside the time-based size.
Pruning deletes whole partitions, and a partition is removed only once it holds no data younger than the prune age, so with a retention of N months the oldest data on disk can be N months plus one partition. Set retention to the longest span any report, contract, or regulation requires; if nothing names one, pick a deliberate period for trend data and record it. The retention settings and their provider interactions are covered in setting historian pruning and retention for Ignition tag history. For the mechanics of dropping aged partitions, configuring Ignition pruning for old data partitions walks the provider settings.
Leave disk headroom for the changeover: rows already written stay until their partition ages past the prune age. Before you enable pruning, take a full backup and confirm the retention period against every reporting obligation, because pruning deletes partitions permanently.
Confirm the growth rate dropped #
- Record the database size and the current partition's row count at the same time each day for a week.
- Growth should fall in proportion to the rows removed from the heavy tags; a 50× cut on the dominant tag shows as a step in daily growth within days.
- Confirm new partitions appear at the size you set and that partitions older than the prune age disappear once pruning runs.
- Trend one modified tag across a known process move and check the display still resolves what the reports need.
Questions asked
Should the deadband be Absolute or Percent?
Absolute is the default and the right choice for a tag like the kWh accumulator, because the threshold is a fixed engineering-unit change: 0.5 means a row every 0.5 kWh. Percent mode computes the deadband as a percentage of the tag's engineering unit range, which suits setting one policy across tags with very different spans. Use Percent only when you want that span-relative behavior.
Is compressing the existing table worth doing at all?
Not first. Compression shrinks what is already stored while the same rows keep arriving, about 1 GB per day in this case, so the table resumes growing immediately and backups still carry the bulk. Run it only after the write rate and pruning are fixed, and only if disk pressure still justifies the maintenance window.
Why can the disk hold more history than the retention period?
Pruning deletes whole partitions, and only once a partition contains no data newer than the prune age. With two-month partitions and three-month retention, the oldest data on disk can be about five months old. One-week partitions shrink that overshoot from months to days.
When should tags move to wide-format tables instead of the historian?
Only for tags recorded at a constant interval and reported as a group: a shift snapshot of ten readings becomes one wide row instead of ten tall ones. Keep event-driven tags and tags that sit still under a sensible deadband in the historian; fixed-interval logging of slow tags writes more rows, not fewer.
How short should the minimum time between samples be?
Match the fastest change a report has to resolve, not the scan rate. For hourly energy reports, one sample per minute is generous: 1,440 rows per day instead of the 480,000 a 0.01 deadband produces at 200 kW. Sampling faster only refines a totalizer you already report hourly.