Technical article | Ignition data storage

Ignition Tag Historian vs SQL Bridge: Choosing the Right Data Storage Approach

They both write to a database, and that is where the similarity ends. Tag history stores observations over time; SQL Bridge transaction groups perform database operations. Using one for the other's job is the most common Ignition data-model mistake.

Version basis: Ignition 8.3 documentation, with 8.1 differences noted. Confirm the exact version and module licensing in your environment before applying a recommendation.

The question sounds like a storage preference. In practice it is a question about what the record means. A temperature sampled every second is an observation. A cycle that started, consumed 1,262.5 kg, and ended with a fault is an event. The first is well served by a time-series historian; the second is a row in a business table with keys, status, and a retention requirement. Trying to represent both in one structure produces either a historian full of business rows or a SQL table full of millions of samples.

Two different jobs

Ignition tag history answers questions such as: what was the temperature between 08:00 and 09:00, how did the pressure trend during the batch, and what was the maximum value during the cycle? It stores values against tags over time and is queried through history bindings, reporting data sources, or the scripting API.

SQL Bridge transaction groups answer questions such as: did the cycle start, what was the ending totalizer, was the batch accepted, and did the ERP receive the completion? They map items to database columns and execute on a schedule or trigger.

The distinction is not "time-series versus relational." SQL Server stores timestamps very well. The distinction is sampling versus events: a historian decides which values to keep over time, and a transaction group decides when an operation happens.

What tag history is good at — and what it is not

Sampling is the product

History configuration is a filtering decision. Ignition supports periodic collection, on-change collection, and tag-group-driven collection, with a minimum/maximum timer and a deadband. Those settings determine which values reach storage.

  • Periodic. Store on a fixed interval. Predictable volume; may miss short changes.
  • On change. Store when a value changes beyond the deadband. Efficient for stable signals; needs a max timer so a flat value still produces a heartbeat.
  • Deadband. A new value is stored only if it differs from the previous stored value by more than the configured amount. A 0.5 °F deadband on a temperature that moves 0.3 °F will store nothing until the 0.5 °F threshold is crossed.

That is the point of a historian: it stores a representation of the process, not every sample the controller produced. The representation is useful for trends and averages. It is not a guarantee that every discrete transition was captured.

Providers change the failure behavior

In Ignition 8.3, history providers are not interchangeable. The Core Historian is an embedded QuestDB store that writes directly to disk with a write-ahead log and does not use Store and Forward. The SQL Historian writes to an external SQL database, requires the SQL Historian module in addition to Historian Core, and routes data through Store and Forward. The Internal Historian (Legacy) uses a local SQLite database and remains available for Edge and small installations.

The same tag history configuration can therefore have a different outage behavior after a provider change. That belongs in the design review, not in the upgrade notes.

Retention and pruning

A historian without a retention policy becomes a large, slow database. SQL Historian supports time-based partitioning and pruning; the 8.3 documentation warns that pruning should be enabled on only one SQL Historian per database, because conflicting pruning tasks can put the data sink into a critical failure state and stop Store and Forward processing. Core Historian supports partitioning and archiving natively.

Retention is a business decision. Process trend data may need 30–90 days; a quality record may need years. Storing the quality record in the historian because it is convenient does not satisfy the retention requirement, and storing raw 1 Hz samples for seven years because the quality system needs the batch record is an expensive way to answer an audit question.

What SQL Bridge is good at — and what it is not

Transaction groups are operations

The SQL Bridge module runs transaction groups, which the Ignition documentation describes as execution engines that perform database tasks. The group types are:

  • Historical group. One-way logging of a data point per item to a column.
  • Standard group. Two-way exchange: log to the database or pull values into tags and OPC items.
  • Block group. Create, modify, or extract multiple rows per execution.
  • Stored procedure group. Invoke a stored procedure and return OUT or INOUT parameters.

Triggers decide when the operation runs: scheduled, on a value change, or on a rising edge. A scheduled group writes on an interval. A rising-edge group writes once when a bit goes from false to true. That difference is the difference between a sample log and an event log.

The table is a contract

When SQL Bridge writes to a table, that table becomes an interface. Its columns, keys, and nullability are consumed by reports, .NET services, and possibly the ERP. A schema change is an integration change even when the group still runs. Name the tables deliberately, own them explicitly, and document the key that makes a row unique.

A transaction group is not a historian. If it writes a row every second, it is a slow and expensive sampler with none of the historian's query optimization, deadband handling, or retention features. If it writes a row per cycle, it is doing the job it was designed for.

Failure behavior: the part that decides the design

Ask what happens when the database is unavailable for ten minutes, and when the gateway restarts during a cycle.

Failure behavior comparison
Condition Tag history SQL Bridge
Database outageSQL Historian buffers through Store and Forward; Core Historian uses its embedded storeDepends on group and connection behavior; test the exact configuration
Gateway restartPending history is handled by the provider's storage pathAn in-flight trigger may be lost or repeated; the table key must handle it
Duplicate deliveryHistory may contain repeated samples; queries deduplicateA second row can double-count a production event unless a unique key prevents it
Late dataTimestamped samples can arrive after the event windowA delayed trigger can post after the business process has moved on
RetentionProvider pruning or partitioningTable-level policy, often tied to the business record

For a production event, the duplicate case is the dangerous one. A completion posted twice affects inventory and cost. A sensor sample stored twice affects a trend minimally. That is why the event table needs a business key and a unique constraint, and why the historian does not need one in the same way.

Decision table

Choosing between tag history and SQL Bridge
Data Better default Reason
Temperature, pressure, flow trendTag historyTime-series retrieval, deadband, aggregation
Cycle start and endSQL Bridge or serviceDiscrete event with identity and status
Batch quantity and dispositionSQL tableBusiness record with joins and audit
Alarm occurrenceAlarm system, not historianAlarm state has its own model and acknowledgement
Recipe downloadStandard transaction groupTwo-way exchange with validation
Serialized unit measurementSQL tableOne record per unit, with method and limits
Short process excursionHistorian with fast sampling or a PLC eventSampling must be fast enough; otherwise record the event at the source
Operator commentSQL tableText and user identity, joined to the production event

A combined design that works

Most useful Ignition systems use both. A mixer is a clean example:

  • Tag history records temperature and totalizer at a defined rate with a deadband and max timer. This supports trend review and average/max calculations.
  • A transaction group writes one row at cycle start and one at cycle end, with equipment, batch, job, quantity, and status.
  • A SQL view or reporting query joins the event row to the samples in its time window when an investigation needs both.
-- Illustrative join: cycle record plus process summary
SELECT c.EquipmentId,
       c.BatchId,
       c.CycleStartUtc,
       c.CycleEndUtc,
       c.EndTotalizer - c.StartTotalizer AS BatchKg,
       h.AvgTempF,
       h.MaxTempF
FROM dbo.MixCycle AS c
OUTER APPLY (
  SELECT AVG(v.NumericValue) AS AvgTempF,
         MAX(v.NumericValue) AS MaxTempF
  FROM dbo.TagHistoryView AS v
  WHERE v.TagPath = 'Mixer/Temperature'
    AND v.Quality = 1
    AND v.TimestampUtc >= c.CycleStartUtc
    AND v.TimestampUtc <  c.CycleEndUtc
) AS h
WHERE c.CycleStartUtc >= @FromUtc
  AND c.CycleStartUtc <  @ToUtc;

Illustrative query over a reporting view. The view, not an internal historian table, is the contract. Tag paths and quality encodings vary by configuration.

The join works because both records share an equipment identifier and a time window. It works better when the event row also stores the batch identifier, because the time window alone can include samples from a previous or next batch.

Ignition 8.3 changes that affect this decision

  • Licensing. The Tag Historian license item was replaced by Historian Core and SQL Historian license items. SQL Historian is a separate module.
  • Core Historian. New embedded QuestDB provider with partitioning, deduplication, archiving, and native aggregation. It writes directly to disk and does not use Store and Forward.
  • Path syntax. Historical tag paths use sys and prov instead of drv for the newer functions. SQL Historian still uses drv, and existing 8.1 syntax continues to work.
  • Scripting. system.tag.queryTagHistory, queryTagCalculations, storeTagHistory, and related functions are deprecated in favor of system.historian functions such as queryRawPoints, queryAggregatedPoints, and storeDataPoints.
  • Custom aggregates. Custom Tag History Aggregates are deprecated and supported only with the legacy query functions.
  • Quarantine. Quarantine exports use JSON rather than XML, so 8.1 exports cannot be imported into 8.3.
  • Gateway Network. An 8.3 gateway cannot store data to an 8.1 gateway; upgrade the central gateway first for remote history.

The practical consequence: an 8.1 history design copied into an 8.3 project may use the wrong provider assumptions, the wrong query function, or the wrong path syntax. A migration should test the actual reports and scripts, not only the tag configuration.

Pitfalls worth checking before go-live

  • Historian as audit log. History records what was sampled, not every state change or operator action. An audit requirement needs an event table with an immutable record.
  • Transaction group as historian. A one-second scheduled group is an expensive sampler with no deadband, aggregation, or history retention model.
  • Trigger that fires twice. A value-change or rising-edge trigger can fire again after a reconnect or a restart. Enforce a unique business key.
  • Deadband that hides the event. A deadband chosen for storage economy can remove the excursion the quality investigation needs.
  • Timezone drift. Store UTC. A local-time trend can be ambiguous across daylight-saving transitions.
  • Stale values. A good-quality value that stopped updating looks valid. Check freshness, not only quality.
  • Direct internal-table reads. Query through supported history tools and documented reporting views. Internal tables are not a stable integration contract.
  • Retention mismatch. Pruning that deletes the raw history before the batch record's retention period leaves an audit gap. Align the two policies.
How this connects to the service

The Ignition SCADA development and integration service covers history configuration, SQL Bridge design, and the integration path from these records to ERP, MES, and quality systems. The version-specific statements here follow the Ignition 8.3 user manual and the 8.1-to-8.3 upgrade guide; confirm them against the exact release in your environment.

Start with the record

Which of your Ignition tables is doing a historian's job?

A free session can review the tag history configuration, the transaction groups, and the queries that depend on them — and identify which record needs to change.

Or email Gene.Farber@ExpertTechPilot.com
Call (216) 236-3987