I need to read a database table (sorted rows) with 300+ million TIMESTAMP
as LocalDateTime
in Java, and I need to get a single hash of all of them. Then, I need to get the same hash from the migrated database (different brand and all) and get the hash to compare.
I think I can use LocalDateTime.toString()
to get a String, then get their bytes and use these to update the hash.
However, it’s 300 millions values… twice. I’ll run this during the database migration so hopefully it should be fast.
What’s a good efficient way of getting the bytes of a LocalDateTime?