Thread: need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
Re: need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
Hi
Why do you need checksums? Can you not employ a full outer join? My though behind this is that checksumming is quite costly cpuwise and you have to fiddle with each and every relevent column, be it as part of the checksum string be it as part of the joiner. The joiner would have the advantage that you could, if you wanted, also implement logic to tell you precisely in which columns the difference is encountered.
Kind regards
Thiemo
HiNeed SQL logic/different approach method's to find out way'sa) to Implement check sum to validate table data is migrated correctlyAny guidanceRegardsBharani SV
Re: need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
OP might be referring to migrating from, say, Oracle to Postgresql when oracle_fdw is not available.
Hi
Why do you need checksums? Can you not employ a full outer join? My though behind this is that checksumming is quite costly cpuwise and you have to fiddle with each and every relevent column, be it as part of the checksum string be it as part of the joiner. The joiner would have the advantage that you could, if you wanted, also implement logic to tell you precisely in which columns the difference is encountered.
Kind regards
Thiemo
Am 27.10.2023 um 10:56 schrieb Y_esteembsv-forum:HiNeed SQL logic/different approach method's to find out way'sa) to Implement check sum to validate table data is migrated correctlyAny guidanceRegardsBharani SV
Born in Arizona, moved to Babylonia.
Re: need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
HiNeed SQL logic/different approach method's to find out way'sa) to Implement check sum to validate table data is migrated correctly
When migrating from Oracle to PostgreSQL, on both the Oracle side and the Postgresql side, I dumped each table (for the big ones, I split them into views) as a tab-separated value file ordered by the primary key and piped that into md5sum.
Had to play a few games with capitalization in blob/bytea columns
That way, I could verify that each table's data was identical.
Born in Arizona, moved to Babylonia.