The disclosed embodiments relate to an apparatus for performing query operations. The apparatus comprises a base table having spatial objects, an index table having data entries that are associated with the spatial objects. A module that is adapted to perform the query operation is configured to convert a query window into values, create a scan range for each of the values with a begin range value, an end range value, and a stop condition, scan the data entries for each of the scan range to identify one of the end range value and the stop condition, and return a result based upon the data entries that are within the scan range for each of the values.