IMD SolutionComputing LibraryShop main store

Explainer

Ignition history providers split retention and data pruning

Edge computing and IIoT Published 9 min read

Short answer

Most tags need only a short window of history, but a few need every record since startup; one history provider forces one pruning age on all of them. Create a second history provider on its own database connection, set each provider's data pruning to its group's window, and assign tags in the tag editor. Moving a tag changes only future storage: records already written stay under the previous provider, so keep it available for queries.

On this page
  1. Why one provider cannot serve two retention groups
  2. Where the pruning policy lives
  3. Split the tags by retention, not by location
  4. Moving a tag moves future storage, not past records
  5. Worked example: a 90 day pruning age for tags needed 3 months back
  6. Rollout order that protects the records you must keep
  7. What healthy pruning looks like afterward
  8. Questions asked

One data pruning policy covers everything a single history provider stores, so a database that mixes tags needing only a recent window with tags whose history must survive from startup either loses early records or keeps every row forever. Run two providers instead. Put the rolling-window tags on a short-term provider whose pruning age matches the deepest look-back anyone actually runs — the case worked below needs 1-3 months — and move the project-long tags to a second provider with pruning left off. You assign each tag in its tag editor, and the change moves future storage only: rows already written stay under the previous provider, so that provider stays configured and queries get tested across the cutover. The sections below justify the split, work the pruning-age arithmetic, and give the rollout order that keeps the records you must keep.

Why one provider cannot serve two retention groups #

The historian runs two separate jobs. Collection writes tag values as they arrive. Data pruning deletes stored data once it passes an age configured on the provider. With every history-enabled tag on one provider, that age is a single number for the whole database. Set it short and the tags whose trends must reach back to the beginning of the project lose their early rows. Set it long enough to protect those tags and every fast-changing tag accumulates rows for that entire span, so the database grows at the pace of the churniest tag rather than at the pace of the tags that actually need the depth. The retention requirement belongs to a group of tags, and the history provider is the smallest object that carries its own pruning age, so the group boundary has to become a provider boundary.

Arrangement Retention control What it costs
One provider for every tag One pruning age for the whole database Protecting startup-era rows holds every high-churn tag's rows for the same span
Two providers, tags assigned by retention group Each provider carries its own pruning age Someone picks a provider each time a new tag gets history enabled
Providers changed with no query plan Future storage moves, past rows stay put Charts reaching across the cutover need the previous provider kept and queried

The third row is not an argument against the split; it is a task the split creates, and later sections handle it. And this is the supported arrangement, not a workaround: the provider list exists precisely so retention can differ between groups.

Where the pruning policy lives #

History providers are configured in the Gateway. In Ignition 7.9 you open the Configure section of the Gateway, select Tag > History, and the Historical Tag Providers page lists every provider with its settings, data pruning included; later versions keep provider and pruning settings in the Gateway configuration under different menu names, so treat these steps as the 7.9 map. The documented behavior of that setting matters twice. Data pruning removes stored data automatically once it reaches an age you set, and it removes whole tables — old partitions — not individual rows. Because deletion happens at whole-table granularity, nothing younger than the configured age is ever removed, which makes the age a floor you can promise on; the same granularity lets rows past the age linger until their table is dropped, which over-satisfies retention rather than breaking it.

Each provider sits on a database connection: a connection with its historian enabled — the built-in tag historian, SQLTags Historian in 7.9 naming — offers a provider. Leaving that historian disabled on connections that should not offer history keeps the provider list short when you assign tags in the Designer. One trap to rule out before you rely on two independent windows: providers behind connections that share one pruning boundary do not prune independently, and why two Ignition historian connections share one pruning boundary explains how that happens. For the pruning controls themselves, setting historian pruning and retention for Ignition tag history walks the settings in detail.

Split the tags by retention, not by location #

The deciding criterion is how long each tag's history must survive — not the PLC it comes from, not the tag folder, not the screen that displays it. Tags scanned by the same controller can sit in different groups, and usually will: fast process values churn hard and are trended only over the recent window, while batch identities, accumulating totals and quality records are the tags people ask for since the beginning of the project. Walk the history-enabled tag list and give every tag exactly one group: rolling-window, or project-long. A tag whose requirement nobody can state stays where it is until someone owns the decision; moving it later costs no data, only another cutover to test.

Whether the two providers should also land in two databases — separate schemas, backup schedules and disk budgets — is a second decision, and when to split tag history into separate historian databases covers it. The provider split in this article works either way, because a provider follows its database connection and each connection can point at its own schema.

Moving a tag moves future storage, not past records #

Changing a tag's history provider reroutes the samples written from that moment on. Rows already stored do not move: they remain in the database behind the previous provider, filed under the tag path and provider they were written with, and the reassignment itself deletes nothing. The new provider starts a fresh series for the tag at the cutover. Two consequences follow. The previous provider stays configured and reachable for as long as anyone may query history from before the cutover, and retiring it is a separate decision, made only after its database is backed up and nothing queries that range anymore. And a chart that spans the cutover is really reading two providers, so it will not stitch the halves for you automatically; run the same history query against each provider before you trust a production trend across the change.

Do not confuse this with the other identity change. Moving tags between tag providers, or renaming tag paths, changes the identity that history rows are stored under and breaks trend continuity in its own way; bridge Ignition tag history after a tag path change handles that repair. The provider split here changes only where new rows are written.

Worked example: a 90 day pruning age for tags needed 3 months back #

The case is the one this article serves: most history-enabled tags need only a recent window, and a minority need every record since the beginning of the project.

Inputs #

  • Retention requirement for the rolling-window group: 1-3 months of look-back, as the case states.
  • Pruning age chosen: 90 days, the top of that range, so the guarantee carries margin instead of sitting on the edge.
  • Documented pruning behavior: data pruning deletes stored data once it reaches the age set on the provider, and it deletes whole tables — old partitions — never single rows.

The rule in words #

A row becomes deletable when its age passes the configured age, and deletion then happens at whole-table granularity: the table holding the row is dropped, rows and all. Nothing younger than the configured age is ever deleted, because a table young enough to hold such rows is not old enough to be dropped.

Arithmetic #

3 months at 30 days each = 90 days, so that is where the short-term provider's pruning age is set. Take a row written on the day of the cutover: it is still present when it reaches the configured age, because whole-table deletion has not touched it, and it disappears at some point after, when its entire table crosses the threshold. Worst case it survives up to one table-span past the age — the span being whatever the provider's partitioning produces; best case it goes shortly after crossing it.

Result and the decision it forces #

Guaranteed availability: every row in the rolling-window group survives at least 90 days, so the deepest look-back in the requirement is covered with margin to spare. Set the short-term provider's pruning age to the deepest look-back the group actually needs, and leave pruning off the project-long provider. The threshold is symmetrical: an age shorter than that look-back deletes rows someone will ask for; an age longer only stores rows past their useful life. A group whose need stops at one month gets 30 days instead.

Rollout order that protects the records you must keep #

The destructive step in this project is the pruning age: once active, it deletes whole tables of rows in a single pass, with no per-row recovery. Back up before you set it, and prove the behavior on one moved tag before the whole group changes.

  1. List every history-enabled tag and assign it to the rolling-window group or the project-long group; park any tag whose requirement is unclear on its current provider until someone owns the call.
  2. Record each tag's current provider, plus every tag path that charts, reports and scripts query.
  3. Back up the database behind the current provider and the database behind the new connection.
  4. Create the second database connection, confirm it reaches its database, and leave the historian disabled on connections that should not offer a provider.
  5. Set the pruning age on the short-term provider and leave pruning off the project-long provider.
  6. Move one representative tag per group and note the cutover time; confirm that new writes land under the new provider, that the old provider still returns pre-cutover rows, and that a query returns a known tag, value and timestamp written after the cutover.
  7. Move the remaining tags group by group, recording the provider choice wherever tag configuration is documented.

What healthy pruning looks like afterward #

Do not judge the setting in the first week. Pruning shows its effect only once data starts aging past the configured age, so storage keeps climbing until the first tables cross the threshold and flattens from there; the short-term database then grows by roughly one window of rows, not without bound. Row counts differ from tag to tag — logging on change, cyclic logging and buffering produce different volumes for the same number of tags — so compare each provider's growth against its own past, not against another tag's.

Confirm the chain end to end after the move: the provider healthy in the Gateway, the write accepted by the database behind it, and a query that returns a known tag, value and timestamp from after the cutover. If live values are good but the new provider stays empty, the fault sits in history enablement or provider assignment rather than the controller; why Ignition historian tags stopped recording but live data is good sorts the two cases apart.

Questions asked

Does a new history provider require a new database?

You need a database connection for each provider, because a provider is the historian enabled on a connection. Whether that connection targets a new schema or the existing database is your call: a second schema gives the group its own disk budget and backup schedule, while reusing the database keeps the footprint small but stores both groups' tables in one place. Decide that when you create the connection, before any rows are written, because moving history rows afterwards is a migration project of its own.

What data pruning age should the project-long provider get?

None. Leave data pruning off the provider that must keep history from startup, because any finite age eventually deletes rows someone will ask for. Permanent retention costs storage, so watch that provider's growth and archive or export when the database outgrows its disk budget — but set a pruning age only when the business confirms a real limit on how far back those tags are ever queried.

How do I test a chart before trusting it across the cutover?

Query the tag's history three times: once for a range entirely before the cutover, once entirely after, and once spanning it. Run each against both providers if your query tool lets you pick one. If the before-range returns rows from the old provider and the after-range returns rows from the new one, the data is intact; if the spanning query in a chart misses one half, the fix is in that chart's provider or binding configuration, not in the database.

Does moving a tag to a new provider delete its old records?

No. Reassignment changes only where new samples are written; rows already stored remain in the database behind the previous provider, under the paths they were written with. Deleting any of those rows is a separate maintenance task, done with the database's own tools, and it should wait until the old database is backed up and no chart, report or script queries that range anymore.

Keep reading

  • How-to

    Setting historian pruning and retention for Ignition tag history

    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.

    Edge computing and IIoT

  • Explainer

    Tag Historian vs SQL Bridge storage for a short-term trend database

    Use Tag Historian for plant-wide short-term trending because it stores narrow, on-change rows; keep SQL Bridge for PLC-to-database handshakes that need one wide row per group execution. Copy closed time partitions and the tag-mapping tables to the downstream historian, and prune only after the copy is confirmed.

    Edge computing and IIoT

  • Explainer

    When to split tag history into separate historian databases

    Keep the ten tags in one historian unless their groups truly need different retention periods; that policy difference is the only sound reason to split history into separate databases. Query speed is not: a historian query reads the tags and time range requested, not whole files, so smaller stores make trends no faster and a cross-group trend may read several stores. Fix storage growth with deadbands first.

    Edge computing and IIoT