Re: Hashes from composite keys?
From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Mon, 26 Jul 2010 21:47:25 -0300
Message-ID: <4c4e2ca4$0$11821$9a566e8b_at_news.aliant.net>
>
> Really?
Date: Mon, 26 Jul 2010 21:47:25 -0300
Message-ID: <4c4e2ca4$0$11821$9a566e8b_at_news.aliant.net>
Daniel Pitts wrote:
> On 7/26/2010 4:03 PM, Bob Badour wrote:
>
>> Daniel Pitts wrote: >> >>> On 7/23/2010 1:14 PM, Karsten Wutzke wrote: >>> >>>> Hello, >>>> >>>> what are the best practices for generating hash codes from composite >>>> keys? I need to mimic something like what a composite index does. In >>>> fact, it's for mapping between relational keys and object IDs. >>>> >>>> Can anyone point me into the right direction please? >>> >>> Yes, don't use Hashing, but use a composite key. Aggregate the keys >>> into one value (eg, the BIT pattern of that one key value is the >>> concatination of the bit patterns of all the other values.) >> >> That's rather dumb advice.
>
> Really?
Yes, really.
> The OP said "I need to mimic something like what a composite
> index does" Well, I suggested a simplified (yet correct) version of
> what a composite index does.
Your advice assumes it makes any sense to "do what a composite index does" to "map between relational keys and object IDs". That's a dumb assumption making your advice dumb advice. Received on Tue Jul 27 2010 - 02:47:25 CEST