13 mins read

Time Series Database: 7 Design Choices for Reliable Measurement Data

A time series database stores measurements and events with the times they relate to. It helps teams ask how a value changed, what happened in a time window, and which devices or services behaved differently. It is useful when time shapes most queries, rather than merely appearing as one field in a business record.

This guide explains how to choose and design a store for time series data. It covers timestamps, record identity, query needs, late arrivals, summaries, retention, and recovery. A machine-monitoring example shows how those choices affect the chart a business user actually sees.

What makes time series data different?

A stock record tells you how many items you have now. In contrast, a series of stock readings tells you how that count changed. Likewise, one temperature reading gives a value at an instant. Many readings let a team study trends, spikes, and gaps.

The records often share a simple shape: time, source, measure, value, and a few useful labels. Yet the meaning of each part matters. A reading with the wrong unit or source can create a plausible chart that tells the wrong story.

For example, an operations team might track a machine’s temperature each minute. Staff may need the latest value, the highest value in a shift, and a chart of the last hour. Those are clear query needs that a team can test before choosing a product.

A specialist store can fit this work. However, a relational database may also meet the need, especially at modest scale. Start with the data and queries rather than assuming that every dated record needs a new database.

1. Define what the timestamp means

A device can measure a value at one time and send it later. Keep the event time distinct from the time your system receives it. Otherwise, a delayed upload may make a morning event appear to have happened in the afternoon.

Next, choose a clear time convention. Store an agreed reference time and retain enough context to show local shifts or business days correctly. A shift that crosses midnight needs a rule that staff can explain.

Also state the time precision you need. A daily total and a high-frequency vibration sample have very different needs. Extra precision does not repair a device clock that is wrong.

Test clock drift and missing times. If a source sends a future timestamp, the system should flag it under a defined rule. Quietly accepting it can distort the latest-value screen and time-based expiry.

2. Give a reading a stable identity

A network retry can send the same reading twice. Decide how the database or ingest service recognizes a repeated record. Time alone may not be enough if a source can produce several valid values at the same instant.

For instance, your record might use a device ID, measure name, event time, and source sequence. The exact key depends on the source. Write the duplicate rule before relying on a supplier’s default behavior.

Then test a correction. If a device sends a revised value, should it replace the first reading or create a new revision? Preserve enough history to explain a report if the correction changes a result.

Keep units clear too. Do not mix Celsius and Fahrenheit under a field called temperature. Convert under a clear rule or store separate units, then make the chart use the intended one.

3. Design around the queries people use

List the screens, alerts, and reports the store must support. A live dashboard may ask for the latest value per device. For a maintenance review, staff may need a month of readings for one machine. A fleet comparison may scan many sources over a shorter window.

Next, test those queries with data shaped like your own. Include the number of sources, labels, missing values, and time range you expect. A fast demo with one device says little about a busy production query.

Be careful with labels that create many distinct combinations. A device category may help group readings. A unique request ID on every point can produce a very different workload. Ask the vendor how its current engine handles that pattern.

Oxen’s guide to database optimization explains why query shape matters. Measure the actual slow path before assuming that a larger server or a new database will solve it.

4. Plan for late and missing readings

A missing reading is not a zero. Zero can mean a machine stopped, while a gap can mean a broken sensor or a lost connection. Keep those states distinct in storage and display.

For example, a chart may show a break when no reading arrives within the agreed interval. A separate status can explain that the device is offline. Drawing a smooth line across the gap may imply knowledge the system does not have.

Late data also affects summaries. If an hourly total runs before all readings arrive, decide whether a later job revises it. State when a report remains provisional and when the team treats it as closed.

InfluxData’s downsampling task guide discusses time-window summaries and late data in its version 2 task model. Use the idea as a design example, while checking the equivalent features in the version you plan to deploy.

5. Choose summaries that preserve the business question

Downsampling means keeping a summary for a time window instead of every original point. It can reduce long-term storage and speed up broad reports. However, the summary must retain what the business needs to know.

An hourly mean temperature can hide a brief peak. If staff investigate overheating, they may also need the maximum, the count of readings, and time above a chosen threshold. A mean alone cannot answer those questions later.

Next, check how you combine summaries. Averaging two hourly averages can give the wrong result if the hours contain different numbers of readings. Retaining a sum and count can support the correct combined mean for that case.

Also define how irregular sampling affects the measure. A simple average of points and a time-weighted average answer different questions. Have the person who owns the measure approve the rule rather than letting a chart default decide.

6. Treat retention as a data policy

Set separate periods for raw readings, summaries, exports, and backups where the business needs them. More history can help investigations, but it also adds storage, access, and upkeep work.

InfluxData’s InfluxDB 3 Core retention guide explains a useful distinction: expired points stop appearing in queries even though physical removal may happen later. Do not assume query expiry and full deletion are the same event.

Then test what an older report shows after raw data expires. It may use retained summaries, an approved snapshot, or a clear unavailable state. Staff should not see a blank chart and assume that nothing happened.

Our data governance guide can help assign owners for these rules. Record who may change retention and how the team reviews the effect on reports.

7. Prove the full ingest and recovery path

A database can be healthy while the ingest service drops data. Check the path from source to queue, write, query, and final screen. Each step needs a clear success or failure signal.

For instance, a sender should not discard its only copy merely because it opened a network connection. Agree what acknowledgement proves a durable handoff. Then test what happens if the connection fails before the sender receives that response.

Also run a restore drill. Recover a sample period, query it, and compare known readings and summaries. A backup job that reports success does not prove that the restored data answers the expected questions.

Oxen’s guide to observability engineering covers useful service signals. Apply them to ingest lag, failed writes, queue age, missing sources, and query errors.

A worked machine-monitoring design

Imagine a workshop tracking temperature on several machines. This is a design example, not a reported client result. Each reading includes a machine ID, event time, receive time, temperature unit, value, and source sequence.

First, the ingest service checks required fields and flags impossible times. It applies the agreed duplicate rule before storing a reading. A device that retries the same sequence should not double the count.

Next, the live screen shows the latest valid reading and its age. If a source stops sending, the screen marks the value stale. It does not keep presenting an old value as a current measurement.

The hourly process stores a mean, maximum, sum, and count under the approved method. It revisits recent windows to account for late data. Reports find the windows still open to change.

Finally, the team retains raw and summary data for separate agreed periods. A restore test checks one ordinary hour, one gap, one duplicate, and one late correction. Staff can explain each result from source to chart.

Keep alert rules separate from chart rules

A chart can summarize an hour, while an alert may need to act on a short burst. Define those two uses separately. A line that looks calm at hourly scale may hide the event an alert should catch.

For a test, create a short run of normal values and one high value. Then add a gap and a late reading. Ask the team to state which events should raise an alert, when it should clear, and whether late data should raise a new notice.

Next, test the source count. A fleet mean can change because a device stopped reporting, even if no active device changed its value. Show the number of active sources with the measure so staff can see that shift.

Also define how a user acknowledges an alert. The database may store evidence, but a separate workflow may own review and action. An acknowledgement should not erase the reading or imply that someone fixed the fault.

Finally, give one person ownership of each measure and alert rule. When a sensor changes unit, sampling rate, or calibration, that owner can review the charts and notices it affects. A technically valid stream can still need a change to its business meaning.

How to compare costs and alternatives

Price the complete workload: writes, retained data, queries, transfer, backups, support, and staff effort. Check how pricing changes as sources and labels grow. Do not compare only the smallest license tier.

A relational store may suit a simple app with strong links to orders or assets. For sustained measurement streams and repeated time-window queries, a specialist time series database may fit. A warehouse may suit slower business analysis across several sources.

Run the same pilot on the realistic options. Use the queries and edge cases above, then record the effort needed to operate each one. Choose the design that meets the need at a supportable cost.

Frequently Asked Questions

Does all dated data belong in a time series database?

No. A date field alone is not a reason to change databases. Look at the volume, write pattern, time-based queries, and links to other business records.

Can we delete raw time series data after summarizing it?

Only when the summary retains the evidence your reports and investigations need. Test peaks, gaps, counts, and later corrections before setting the policy.

What is the most useful first pilot?

Use one source type and a real dashboard question. Include late records, repeats, missing readings, retention expiry, and a restore, then compare the output with known results.

Choose the store around time and meaning

A useful time series database design keeps event meaning, query needs, and data life clear. Start with known readings and business questions. Then prove the full path through storage, summaries, gaps, and recovery before expanding.

Turn measurement streams into useful business screens

Oxen Softwares can help design data pipelines, dashboards, and system connections around the readings your team needs to act on.

Talk to our team

Leave a Reply

Your email address will not be published. Required fields are marked *