SQLite Forum

Shortcut to change a non changing update or upsert in a noop
Ryan, I am sure you would agree that changes() should report actual inserts and rewrite of rows on update, regardless of whether the latter changed any bits.

The optimization opportunity is an interesting question, with no clear answer applicable across use cases. It takes time to read and compare the existing values, which cost would be incurred across the use cases, whereas avoiding a write to storage is obviously only possible for some fraction, likely small, of the update use cases. Given these facts, I see no harm in relying on users to do the check for whether a physical update is needed.