Percona murmur_hash, fnv_64 and fnv1a_64 functions

1.5k Views Asked by At

Can somebody help me understand the use and benefits of these three functions that Percona suggests right after installation?

* Percona XtraDB Cluster is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
 * Run the following commands to create these functions:

        mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
        mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
        mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"

 * See http://www.percona.com/doc/percona-server/5.7/management/udf_percona_toolkit.html for more details

I have never been able to find documentation that clearly explains these function, and what benefits/advantages you get from them.

1

There are 1 best solutions below

4
On BEST ANSWER

The benefit of these functions are "faster checksums"...i.e. more efficient implementations of a couple of hash functions.

But that's only a benefit if you have a need (requirement) generate values provided by these hash functions.

If you don't have any need to generate hash values, then these functions don't provide any benefit.

References:

http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function

http://en.wikipedia.org/wiki/MurmurHash

http://en.wikipedia.org/wiki/Hash_function