Best way to store 32 byte binary value with ability to index
Matthew Jew
mjew at icnc.com
Fri Jul 7 07:56:08 CDT 2006
On Jul 6, 2006, at 10:49 PM, Ruslan Zasukhin wrote:
> On 7/7/06 2:19 AM, "Matthew Jew" <mjew at icnc.com> wrote:
>
> Hi Matthew,
>
>> My application has a need to store 32 byte binary values, which I was
>> planning to store in a FixedBinary field.
>>
>> However, in a recent post it was mentioned that one could use a
>> FixedBinary field to store values that "you do not need to index".
>
> In that post point was:
>
> we have told with Joakim about storing in FixedBinary
> some COMPLEX data structure -- array in particlaur.
>
> I think it is obvious that you CANNOT index field which contain ARRAY.
>
Yes.
What I am storing is a 32 byte hash code / check sum.
>
>> Does that mean that I cannot index (and therefore cannot quickly
>> search on) a FixedBinary field?
>
> In fact yes. Because how we can do this ?
> Well, the only way do binary compare using memcmp()
>
>
>> If that is true, what is the best way to store this 32 byte binary
>> value so that I might quickly locate records?
>
> You need do EXACT search only ?
>
> where fld = x
>
Yes, I need only to do EXACT SEARCH, fld == x.
Is there any way to do this?
Or will I just have to convert it to a (somewhat longer) fixed length
string?
- Matthew
More information about the Valentina
mailing list