On Thu, 2003-11-06 at 19:00, [EMAIL PROTECTED] wrote: > How would you handle the lack of ordering associate with hash tables? > Sqlite can currently use indicies for three main tests: equals, less than, > and greater than. While hash-tables are good at finding equal-to in > constant time it usually means linear time (a table-scan) to test for less > than or greater than. Do you have a solution to this problem?
You presume that a defining characteristic of a hash-table is that the function be non-linear. Consider a n->3 bit function: f(x) -> x mod 8 A very linear function that it is perfectly easy to iterate _in_order_ all values of the table. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]