Generate a Murmur Hash

Posted February 26, 2019 by Jim Knicely, Vertica Principal Solution Architect

Rear view of two partially unrecognizable men sitting in front of a computer. One of them is pointing at a screen where are several lines of computer code.
Murmur (Murmerhash) is a modern non-cryptographic hash function that has a low collision rate and high performance. It is suitable for general hash-based lookups, but not suitable for cryptographic use cases.

Vertica has a built-in function called HASH.

Example: dbadmin=> SELECT murmurhash('VERTICA MURMUR Hash!'); murmurhash --------------------- 6154089896006532138 (1 row) dbadmin=> SELECT murmurhash('The quick brown fox jumps over the lazy dog'), dbadmin-> hash('The quick brown fox jumps over the lazy dog'); murmurhash | hash ---------------------+--------------------- 6788720976440246833 | 4647120267691732726 (1 row) Helpful Links: