SQLite Forum

Are there any plans / chances of supporting a RETURNING clause?
Have you actually checked the timing of this sort of thing with SQLite (as opposed to a full-service Client-Server Database). Remember that SQLite is running in-process accessing the same sort of memory as your cache system that you are writing to try to handle this. Yes, SQLite is likely a bit slow to get the data than from cache store optimized for a particular data model, but you also charge against the cache the operations it is doing to keep it up to date and for every data 'miss' to that cache. Also, it is using up memory that could have been added to the SQLite or OS caches to help avoid needing to go to the actual disk for data (since it is likely caching the recently accessed data that those other caches are holding).

IF you are submitting a change that you can't just know what the results are going to be (so you need the RETURNING clause), it seems that actually doing the SELECT to get fresh data isn't going to be that costly.