in reply to Approximate Matching Key
If you use a DBM that uses B-Tree keys instead of hashed keys, then you can use the non-tied methods to do a "less than or equal" search for a key in a manner that will be very efficient.
But for that to work you need to normalize your keys so that they sort properly as strings. For example, pad them with sufficient zeros, store them as pack("N",$key), or preface the key with the number of digits (length($key).".$key" so long as you don't have keys of more than 9 digits).
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Approximate Matching Key
by tilly (Archbishop) on Apr 07, 2001 at 05:24 UTC | |
|
Re: (tye)Re: Approximate Matching Key
by fxia (Novice) on Apr 10, 2001 at 01:33 UTC | |
by tye (Sage) on Apr 10, 2001 at 01:44 UTC |