From: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | Rob Sargent <robjsargent(at)gmail(dot)com>, Brian Hirt <bhirt(at)me(dot)com>, Dmitriy Igrishin <dmitigr(at)gmail(dot)com>, Viktor Nagy <viktor(dot)nagy(at)toolpart(dot)hu>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Values larger than 1/3 of a buffer page cannot be indexed. |
Date: | 2011-03-29 02:28:41 |
Message-ID: | 4D9143D9.8070707@postnewspapers.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 03/14/2011 09:25 PM, Merlin Moncure wrote:
>> Unless the point is to guarantee uniqueness of the "long-long value"s.
>
> md5 will do that too: the main thing you lose going to hash indexing
> is ordering.
MD5 will *probably* guarantee the uniqueness of the values. Personally
I'm not a big fan of betting on that, and tend to like to test for
equality against the hash first and then, if the hashes are equal,
against the values.
I have several md5 collisions in one of my tables, so it's far from
impossible. In fact, it's much more likely than you'd expect thanks to
the birthday paradox.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2011-03-29 03:54:34 | Re: Values larger than 1/3 of a buffer page cannot be indexed. |
Previous Message | Craig Ringer | 2011-03-29 02:25:56 | Re: Autocommit off - commits/rollbacks |