Skip to main content

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