Patent ID: 8751526

Claim:
A method for computing a union of bounding boxes of entities in a relational database indexed by a spatial index, filtered according to an entity filtering criteria, the method comprising: receiving, by a relational database system executing on an electronic device, a query statement requesting the union of the bounding boxes of entities in the relational database filtered according to the entity filtering criteria; for each of a set of targets to be considered in the spatial index, testing a bounding box of the target against a current range union result, and if the bounding box of the target subject to test is completely contained in the current range union result, excluding the target subject to test from further consideration and when the target subject to test is an internal node excluding any lower level nodes or entities in the spatial index pointed to from the internal node from further consideration, and if the bounding box of the target subject to test is not completely contained in the current range union result, when the target subject to test is an entity, determining if the entity meets the entity filtering criteria, and if so, computing a union of a bounding box of the entity and the current range union result, and storing the union as the current range union result; and when each of the targets to be considered in the spatial index has been subject to test or excluded, returning the current range union result as a final range union result.