跳到主要内容

MURMUR_HASH3_64

murmur_hash3_64

description

Syntax

BIGINT MURMUR_HASH3_64(VARCHAR input, ...)

返回输入字符串的64位murmur3 hash值。

注:在计算hash值时,更推荐使用xxhash_64,而不是murmur_hash3_64

example

mysql> select murmur_hash3_64(null);
+-----------------------+
| murmur_hash3_64(NULL) |
+-----------------------+
| NULL |
+-----------------------+

mysql> select murmur_hash3_64("hello");
+--------------------------+
| murmur_hash3_64('hello') |
+--------------------------+
| -3215607508166160593 |
+--------------------------+

mysql> select murmur_hash3_64("hello", "world");
+-----------------------------------+
| murmur_hash3_64('hello', 'world') |
+-----------------------------------+
| 3583109472027628045 |
+-----------------------------------+

keywords

MURMUR_HASH3_64,HASH