[Question] Potential issues manually querying tag history?

Hello all,

I was wondering if someone could give more detail as to why manually querying tag history is not recommended. Looking at this article, it says that Ignition offers a variety of ways to query the data but does not recommend manually querying.

Although, I have a client who requests that the production database house only the last 90 days of data. Their policies state they cannot delete any data, so I built a SQL script that creates a backup database when the size reaches 8GB, as well as a table and inserts the tag history that is older than 90 days into these. After inserting, the records will be deleted from the production database

Normally I would not need to do this, but they have the EXPRESS version of SQL which is limited to 10GB per database. So far through testing I haven't seen any issues with this. Just want to make sure there won't be any unforeseen errors in the future.

Thank you!

No guarantee at all. The historian's table structures and behaviors are an implementation detail. The only long-term supported way to access history is with the system.tag.* functions.

That said, it isn't likely to change significantly any time soon. Meanwhile, you should advise your customer to abandon SQL Server Express. If $$ are the problem, they should be using PostgreSQL or MariaDB. Those have no limits, and in my not-so-humble opinion, are technically superior, too.


Interesting, I will look into PostgreSQL and MariaDB and see which would fit best for the client. They have used Express in the past as they are a fairly small company. In about 10-15 years they only filled their DB to about 5GB.

Between the two you mentioned, is there one you would recommend over the other?

I default to PostgreSQL. (It's more standards-compliant, and I think it has greater extendability.)

1 Like

Thank you sir!