Yes, this works only with some assumptions. In my case the records could not be modified or deleted

If database may be changed in any way then the only solution is to fully reread all the table contents.