in reply to Re^2: fast+generic interface for range-based indexed retrieval
in thread fast+generic interface for range-based indexed retrieval

It's true that a database server is optimized for complex queries, and that it's difficult to compete with that.

The question I was answering had to do with a more generic non-DBMS way to handle the data, which is something jae_63 asked about. The most generic way that does not involve a DBMS is to make fixed-length entries and index into them. That this reinvents a very basic database I think is obvious.

That a packaged database server is preferred when someone asks specifically how not to use one is open to debate I suppose. I'll not be part of that debate, as I offered an option and you are free to offer yours.

  • Comment on Re^3: fast+generic interface for range-based indexed retrieval

Replies are listed 'Best First'.
Re^4: fast+generic interface for range-based indexed retrieval
by James Board (Beadle) on Dec 12, 2008 at 01:42 UTC
    How about some sort of reverse index? Maybe slice the range into N contiguous sub-ranges and maintain a list of all keys that fall within each sub-range. Then, when you need to find all keys between A and B, look at which sub-ranges intersect the interval (A B), and select keys from them.

    This may or may not be feasible for you, depending on your application, but if it is, it could reduce the query time dramatically.

    Jim