How to look up all rows that overlap a certain value?
October 7, 2004 11:25 AM
Subscribe
I am looking for an index data structure and query algorithm to solve a specific problem. Each row in the table represents a range, with a start/end value; I want to look up all the rows that overlap a certain value.
Putting it in SQL terms, I have a table with columns 'start', 'end', and 'data', and I want to run the following query:
select data from table where value >= start and value < end;br>
I'm working in C++, but don't need source code; I just can't remember the name or design of the algorithm/data structure that performs this kind of indexing.>
posted by Mars Saxman to computers & internet (13 comments total)
posted by Mars Saxman at 11:31 AM on October 7, 2004