The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.

Generate a Murmur Hash

Jim_KnicelyJim_Knicely Administrator
edited February 2019 in Tips from the Team

Murmur (Murmerhash) is a modern non-cryptographic hash function having 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 murmurhash.

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 Link:
https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/Functions/Mathematical/HASH.htm

Have fun!

Sign In or Register to comment.

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.