Archive compression example: Change of data quality

Archive compression example: Change of data quality

The effect of archive compression is demonstrated in the following examples.

This example demonstrates that:
  • A change in data quality causes held samples to be stored.
  • Held samples are returned only in a current value sampling mode query.
  • Restarting the archiver causes the held sample to be flushed to disk.
Normally, a flat straight line would never cause the held value to be written to disk. An important exception is that changes in data quality force the held value to be written to disk. Assume a large archive compression deadband, such as 75% on a 0 to 100 EGU span.
TimeValueQuality
t)2Good
t12Bad
t22Good

The following SQL query lets you see which data values were stored:

Select * from ihRawData where samplingmode=rawbytime and tagname = t20.ai-1.f_cv and timestamp > today

Notice that the value at t2 does not show up in a RawByTime query because it is a held sample. The held sample would appear in a current value query, but not in any other sampling mode:

select * from ihRawData where samplingmode=CurrentValue and tagname = t20.ai-1.f_cv

The points should accurately reflect the true time period for which the data quality was bad.

Shutting down and restarting the archiver forces it to write the held sample. Running the same SQL query would show that all 3 samples would be stored due to the change in data quality.