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.
- 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.
Time | Value | Quality |
---|---|---|
t) | 2 | Good |
t1 | 2 | Bad |
t2 | 2 | Good |
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.