Re: Alternative to serial primary key
От | Markus Schaber |
---|---|
Тема | Re: Alternative to serial primary key |
Дата | |
Msg-id | 44ACEFBF.7030903@logix-tt.com обсуждение исходный текст |
Ответ на | Re: Alternative to serial primary key ("David Clarke" <pigwin32@gmail.com>) |
Ответы |
Re: Alternative to serial primary key
|
Список | pgsql-sql |
Hi, David, David Clarke wrote: > On 7/6/06, Markus Schaber <schabi@logix-tt.com> 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
В списке pgsql-sql по дате отправления: