Hi, David, David Clarke wrote: > On 7/6/06, Markus Schaber <[EMAIL PROTECTED]> wrote: >> This is a good idea if you want to have taller indices, but you still >> need to re-check the "real" key due to hash collisions. > > I am aware there are collisions with md5 but without any actual proof > I believe the risk to be very low with the data I'm storing which is a > kind of scrubbed free form residential address.
Then you'll have to use the re-check approach, like: SELECT * FROM foo WHERE hashed_key = hash(mykey) && plain_key = mykey; And then have an non-unique index on hashed_key, and probably no index n my_key (to give the planner a hint which index to use). HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings