Re: inserting new data only

Simon Slavin <[email protected]> Tue, 25 Feb 2020 18:56:44 +0000
Newsgroups gmane.comp.db.sqlite.general
Message-ID <[email protected]>
This strikes me as best solved in the programming language.

If a single set of data points is being acquired in real time, and you have a programming language (or script) generating the INSERT commands, why not simply keep the most recently inserted temperature in a variable ?

On the other hand, if you have multiple sensors, or out-of-order insertion, or a stateless insertion program, you could insert every reading and before reporting use a 'cleanup' procedure to remove redundant readings.

Both the above would be faster than having SQL execute a search every time a new reading is added.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users