How-to
Setting historian pruning and retention for Ignition tag history
Short answer
Prune tag history on the history provider, not with the transaction group's delete setting: in the Gateway's tag history configuration, enable data pruning and set a retention period in days. At 250 MB per day of growth, 30 days of retention holds about 7.5 GB and a full year about 91 GB. Deadband and Max Time Between Samples decide most of the daily rate, and QC records from transaction groups keep growing on a separate budget.
On this page
Yes, tag history has its own deletion control, and it does not live on the transaction group. Ignition prunes historical data at the history provider: each provider keeps its own tables and records, and every tag assigned to it inherits that one retention policy. The delete-after setting you know from transaction groups removes only that group's rows, so QC data logged through groups is untouched by historian pruning and grows on its own budget. The measured daily figure is not a fault in the provider either — it is what value-change logging plus a forced-sample interval produce, and two tag-level settings govern most of it.
Enable data pruning on the history provider #
Pruning is configured once per provider, not per tag and not per transaction group. One caution before you start: pruning deletes rows permanently, so back up the history tables before turning it on against a database that has never had a policy.
- Open Config > Tags > History in the Gateway. The Historical Tag Providers page lists every provider.
- Select Edit on the provider your chart tags write to.
- Enable Data Pruning and set Retention Period (Days) to how far back operators actually need to chart.
- Save the provider. Samples keep accumulating exactly as before; history older than the retention period is removed as pruning runs.
- If more than one Datasource History Provider points at the same database, enable pruning on only one of them — the manual is explicit on this — and why two historian connections share one pruning boundary shows what that shared boundary means for the second connection.
Sizing retention for the measured daily growth #
Inputs, each with its source:
- 250 MB per day — the measured database growth rate on this system, the figure that triggered the question.
- 30 days and 365 days — the two retention windows worth comparing: a month of operator charts against a full year of reporting.
- Decimal units: 1 GB = 1,000 MB.
- The split between tag history and QC transaction-group tables inside that daily figure has not been measured yet, so size retention on the whole daily figure and treat the result as an upper bound for the history share.
Rule, in words: once pruning has been enabled longer than the retention window, stored history settles at growth per day multiplied by retention days. Until the first window elapses, the database keeps growing toward that cap.
Arithmetic, written out:
- 30 days: 250 MB/day × 30 days = 7,500 MB = 7.5 GB
- 365 days: the same rate × 365 days = 91,250 MB = 91.25 GB
- The gap between the two policies: 91.25 GB − 7.5 GB = 83.75 GB
Result: at this rate, a 30-day policy levels the history tables off near 7.5 GB, and a 365-day policy levels them off near 91 GB. These are steady-state projections at a constant rate, excluding backups, transaction logs and the QC tables.
Decision: set 30 days if no chart or report reads past a month — that is the entire steady-state cost of trend history on this system. Go to 365 days only when something genuinely queries a year back, and budget 91 GB plus QC growth on top. The threshold to carry forward: at the measured rate, every extra month of retention costs about 7.5 GB, so retention is bought one month at a time.
Cut the daily rate with deadband and Max Time #
Retention caps the database; the deadband and Max Time settings on the historized tags decide how fast it fills. The historian stores a record when a value moves by more than the tag's deadband, so a larger deadband keeps small movements out of the database entirely — the live tag still updates on the screen, only its stored trace gets coarser.
Messages arriving every few seconds over MQTT are transport, not storage: a sample is written only when the deadband or the time limit says so. Before changing anything, decide which of the two drives your rate. A flat stored trace with evenly spaced points is the signature of Max Time Between Samples: that setting forces a stored sample at its interval even when the value has not changed, and by default the interval is unlimited, meaning a steady tag stores nothing until it moves. Raising the deadband will not remove those points; lengthening or removing Max Time will.
Set each analog tag's deadband just above the signal's noise band — anything smaller stores noise, anything larger hides real movement. Keep deadband at zero on discrete states, event-like values and anything QC-related, because a filtered-out transition cannot be reconstructed later. If you raise deadbands across many tags in one pass, how bulk deadband changes depend on the tag provider explains why the same edit lands differently depending on where the tag lives. Since the source is MQTT, the storage path itself is also a choice, and MQTT Recorder or Tag Historian for plant data compares the two routes.
Keep QC records on a separate budget #
The transaction group's delete-after setting and the provider's pruning never touch each other's tables: the group setting deletes the group's rows, the provider setting deletes history rows. That separation is exactly what you want here — the QC groups meant to be kept forever simply carry no delete setting and no pruning exposure, and their tables grow without bound for as long as the plant runs. Measure that growth over a fixed week and budget it as its own line on the volume, because no historian retention you choose will stabilize total disk use while QC accumulates.
If you ever do use the group's delete setting on another table, know its failure mode first: a transaction group delete-records fault that removed all rows documents what happens when that setting misfires.
Confirm pruning is actually cutting #
Give the policy one full retention window before judging it. Then check the oldest timestamps in the history tables against the retention period, and re-measure growth over seven days with the same method that produced the daily figure — growth should flatten once the window has elapsed. Pruning works with the provider's data partitioning, so removal arrives at partition granularity rather than row-by-row at the exact retention instant, and the oldest row can sit somewhat past the nominal window. If growth continues past the cap, the causes to check are a second unpruned provider writing to the same database, or the QC tables growing underneath the measurement.
Questions asked
Does the transaction group delete-after setting also prune tag history?
No. The delete setting on a transaction group removes that group's own records only; tag history samples are controlled by the history provider's data pruning setting. If your QC tables must be kept permanently, leave the group's delete setting unset and budget their growth as a separate line from historian retention. QC growth is whatever the groups write, and only the history side stops once pruning runs.
Two history providers write to the same database. Where do I enable pruning?
On only one of them. The documentation is explicit that when more than one Datasource History Provider points at the same database, data pruning is enabled on exactly one, since two cleanup jobs over one set of tables is the situation the rule prevents. The practical effect is that both connections end up inside one pruning boundary, which is why the second connection cannot simply be given a different retention window.
Will enabling pruning shrink the database file that already exists?
Not by itself. Pruning deletes old rows inside the history tables, and the database then reuses that space for new samples instead of growing further. The file on disk stays at the size it reached before pruning, so a volume that filled up does not automatically free space at the operating-system level. Growth stops, which is the goal; reclaiming the file itself is a separate database maintenance operation.
How much storage will a bigger deadband actually save?
There is no fixed percentage, because the saving equals exactly the samples you stop storing, and that depends on how noisy each tag is. Measure it: record database growth over seven days at the current deadband, raise the deadband on the noisiest analog tags, then measure another seven days. The difference between the two weekly figures is the real saving on your system, and it costs nothing to find out.