SQLite Forum

Shortcut to change a non changing update or upsert in a noop
True, the present VFS interface does not help with this. The interface would need to allow the page caching system to notify the VFS when a page is flushed, and no longer associated with a given file section. Then it would be practical for the VFS to keep a per-page CRC or checksum.

I grant that this would not be as effective as avoiding writes with more granularity where such avoidance can be an improvement at all.

I am not convinced that the required extra reading to check for "actual" update is generally worth the I/O operations potentially saved. I am suspicious of applications that would be doing a lot of useless updates. Where are they getting the update data? Why is there so much unchanged data being passed around? I would think acting on actual change is better done at a higher level than the low-level persistence layers.