XXHASH_32
xxhash_32β
descriptionβ
Syntaxβ
INT XXHASH_32(VARCHAR input, ...)
Return the 32 bits xxhash of input string.
Note: When calculating hash values, it is more recommended to use xxhash_32
instead of murmur_hash3_32
.
exampleβ
mysql> select xxhash_32(NULL);
+-----------------+
| xxhash_32(NULL) |
+-----------------+
| NULL |
+-----------------+
mysql> select xxhash_32("hello");
+--------------------+
| xxhash_32('hello') |
+--------------------+
| -83855367 |
+--------------------+
mysql> select xxhash_32("hello", "world");
+-----------------------------+
| xxhash_32('hello', 'world') |
+-----------------------------+
| -920844969 |
+-----------------------------+
keywordsβ
XXHASH_32,HASH