Re: inserting new data only

Simon Slavin <[email protected]> Wed, 26 Feb 2020 17:35:13 +0000
Newsgroups gmane.comp.db.sqlite.general
Message-ID <[email protected]>
On 26 Feb 2020, at 5:18pm, Przemek Klosowski <[email protected]> wrote:

> This 'store only changed values' is
> intended for situations like that.
> Another suitable candidate for that treatment might be a status, for
> instance 'on battery' value for a UPS monitoring system. I can't think of a scenario where storing it every time would be better.

Suppose some horrible disaster happens to your chemical plant at 4pm.  Your log for a particular sensor shows an acceptable value, but the timestamp on that reading is 3:15pm.  But only changed readings are logged.

Perhaps a fault occurred in the sampling circuit at 3:16pm, so no further readings were taken, so an alarm was not raised.  Had every reading been logged you could have proved that another reading was taken at 3:58pm still showing the same acceptable value.

So it depends why you're doing what you're doing.  Different circumstances suggest different tactics.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users