The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Because this is so performance crucial function for as I'm now trying to optimize it and write it only in C and probably in unprotected mode. Problem is that
MD5 returns 16bytes value = 32characters in hexa
But DECIMAL(38) takes 16bytes = but 38decimal places, so you can save here only -10^38 to 10^38, but 2^128= 3.4*10^38, so you lose some information. To save md5 into decimal data type we slove this problem dividing md5 value by 10.
My question is: How can I in C divide DECIMAL16 number by 10
Is there some divide function for DECIMAL16 for example?
code below has some rounding error so we can't use it...