Page 1 of 1
Compare , CRC32, CheckSum functions and their limitations
Posted: Wed Jul 20, 2005 8:22 am
by kollurianu
Can some one tell me are there any limitations in using the following functions:
1.Compare
2.CRC32
3.CheckSum
and what is the difference between CRC32 and CheckSum?
Can i just compare strings with the following expression
"String1"="String2" or "String1" <> "String2"
Any Inputs are greatly appreciated.
Thank you all.
Posted: Wed Jul 20, 2005 8:33 am
by ArndW
Kollurianu,
the best and 100% guaranteed method is to do a String1=String2 comparison. But if the string is 500 characters long it sometimes makes sense to store a short CRC32'd string instead of the original and then do a comparison on the smaller value. The upside is drastically less storage space needed, the downsides are (a) more CPU/processing time to calculate the algorithms and (b) a slight possibility of getting different strings with the same CRC32 code
Posted: Wed Jul 20, 2005 8:48 am
by kollurianu
Thank you so much Arnd.
Posted: Wed Jul 20, 2005 9:34 am
by pnchowdary
Hi Anu,
Like Sainath told in one of the previous posts "CRC32 is a 32 bit fn and CheckSum is a 16 bit fn".
So you are better of using CRC32 than CheckSum as the former has more probability of returning different checksum values for two different input columns.
Posted: Wed Jul 20, 2005 10:36 am
by kollurianu
Thank you Naveen for ur reply.