Re: hash options

From: David W Noon <dwnoon(at)ntlworld(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: hash options
Date: 2012-01-22 19:41:24
Message-ID: 20120122194124.30c5c19b@karnak.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, 22 Jan 2012 09:59:55 -0600, Little, Douglas wrote about
[GENERAL] hash options:

>I'm working on a data warehouse dimensionalization process where I
>need to hash a text string to use as the key. I've implemented with
>MD5. It works fine, the problem I have is the size of the md5 (32
>bytes) is often longer than the original string - thus not
>accomplishing what I want - space savings.
>
>Does anybody have alternative hash function recommendations?

Try CRC32, possibly augmented by a CRC16 in a separate attribute.

I have CRC functions for PostgreSQL, written in C, and will make them
available to anybody who wants them.
--
Regards,

Dave [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon(at)ntlworld(dot)com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2012-01-22 23:40:03 Re: indexes no longer used after shutdown during reindexing
Previous Message Adrian Klaver 2012-01-22 19:18:48 Re: Database takes up MUCH more disk space than it should