1. A computer-implemented method for processing a data stream associated with a given data stream application, comprising steps of: obtaining at least one range query issued against the data stream; building a range query index based on the at least one range query using one or more virtual constructs such that the range query index is adaptive to one or more changes in a distribution of range query sizes, wherein building the range query index comprises decomposing the at least one range query into a minimal number of containment-encoded squares of varying sizes; and searching the range query index with a data value; wherein the step of searching the range query index with the data value further comprises steps of: finding a smallest-sized virtual square containing the data value; finding other virtual squares containing the smallest-sized virtual square; and obtaining query identifiers associated with virtual squares covering the data value; wherein the step of finding the other virtual squares further comprises steps of: finding a partition identifier and local identifier of a smallest-sized containment-encoded square; and repeatedly dividing the local identifier by four to find the local identifier of other containment-encoded squares that contain the smallest-sized containment-encoded square; wherein the range query index is configured to process at least a portion of the data stream associated with the given data stream application; and wherein the steps are performed by a computer system.
1. A computer-implemented method for processing a data stream associated with a given data stream application, comprising steps of: obtaining at least one range query issued against the data stream; building a range query index based on the at least one range query using one or more virtual constructs such that the range query index is adaptive to one or more changes in a distribution of range query sizes, wherein building the range query index comprises decomposing the at least one range query into a minimal number of containment-encoded squares of varying sizes; and searching the range query index with a data value; wherein the step of searching the range query index with the data value further comprises steps of: finding a smallest-sized virtual square containing the data value; finding other virtual squares containing the smallest-sized virtual square; and obtaining query identifiers associated with virtual squares covering the data value; wherein the step of finding the other virtual squares further comprises steps of: finding a partition identifier and local identifier of a smallest-sized containment-encoded square; and repeatedly dividing the local identifier by four to find the local identifier of other containment-encoded squares that contain the smallest-sized containment-encoded square; wherein the range query index is configured to process at least a portion of the data stream associated with the given data stream application; and wherein the steps are performed by a computer system. 8. The method of claim 1 , wherein the step of building the range query index further comprises building the range query index such that the range query index accommodates one or more changes in query positions outside a monitoring area of the at least one range query.