Hello,
Say one has a hash value as an indexed key for a table.
>From an efficiency point of view, would one be better off storing that key as
>a blob or text? In other words, store the raw byte sequence directly or use a
>hex text representation of it?
So, binary:
hash blob not null collate binary, -- as the raw byte sequence
Or text:
hash text not null collate binary, -- as hex encoded
And then:
create index if not exists foo_hash on foo( hash )
>From a storage perspective, using the blob seems to be more straightforward
>(no encoding overhead), so, say, given a SHA1 hash, 20 bytes raw vs. 40 bytes
>hex encoded.
Any gotchas in using blob as keys (unique or otherwise)?
Thanks in advance.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users