History tag - writing data to wrong table

Ignition's history tables are aligned to whatever the partition unit is from when the system starts up/first stores history. They don't go backwards or forwards to align to arbitrary "wall clock" times, which would invite problems with timezones and the like.

In other words,
If you start a system with daily partitions on 2024-10-9 at 13:28 local time,
I would not expect your next "daily" partition until 2024-10-10 at ~13:28 local time.

You can look in the sqlth_drv table to see the unix timestamps assigned to each table partition - those are what actually matters, not the name assigned to the table.

While there are ways to force the system to align with your expectations, I would recommend you don't, for the simple reason that you shouldn't care. The only supported way to query data out of the historian is via Ignition, and we will automatically bridge across as many tables as needed. Partitioning by arbitrary 24 hour slices will still segment the data and lead to approximately the same table sizes.

1 Like