[TYPO3-english] Duplicate cHash values

Mathias Schreiber [wmdb >] mathias.schreiber at wmdb.de
Mon Jan 19 15:26:59 CET 2009


Dmitry Dulepov schrieb:
> Hi!
> 
> Mathias Schreiber [wmdb >] wrote:
>> As far as cHash is concerned instead of doing an MD5 hash you could
>> simply do CRC32() in mysql.
> 
> Yes, crc32 function also exists in the PHP. But I doubt that 32 bits is enough for many possible combinations of URLs.

I'd still do it with triggers and simply store the full parameter string 
in field A and select my result with CRC32 and then insert this on 
database level.

But the "amount of combinations" issue might be interesting to calculate.
I am not sure if anyone has ever beaten the 1 billion marker, plus mysql 
itself might perform rather odd with tables this big, regardles of their 
content.

I'd go for integers only if the binary(16) stuff is slower by at least x2.

enjoy
Mattes


More information about the TYPO3-english mailing list