[Date Prev][Date Next]
Re: ordered indexing for integers
Hallvard B Furuseth wrote:
Also the index is wrong for huge numbers. At some point the indexing
should just give up and use max/min values, but I suppose at least
cryptograpy-sized numbers should be usefully indexed. I.e. at least
two length bytes.
I wonder about that. Two length bytes implies 512Kbit numbers. Who's going to
be storing those in LDAP? A single value of that size is larger than most
entries... Common crypto algorithms use 1024bit numbers and even those aren't
stored on their own in decimal integer format.
Eeh. It makes more sense to check for ridiculous-sized numbers before
parsing them and just output a min/max value depending on sign. (Or
right-truncate e.g. n*12 digits and add n*5 to the length.)
this needs the numbers to be normalized before passed to index/filter
functions. Are they? With different valid text representations of the
same number it gets hard to check against the cut-off size.
Yes, the numbers are already normalized before they get here.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/