Patent ID: 8819017

Claim:
One or more computer-storage media having computer-executable instructions embodied thereon that, when executed, perform a method of affinitizing datasets based on efficient query processing, the method comprising: receiving a plurality of datasets within a data stream; determining a first dataset and a second dataset of the plurality of datasets are related to one another; assigning a common affinity identifier to the first dataset and the second dataset based on determining the first dataset and the second dataset are related to one another; breaking the first dataset and the second dataset into a plurality of extents; assigning the common affinity identifier to each extent of the plurality of extents; and storing a portion of the plurality of extents across a plurality of distributed computing devices, wherein extents having the common affinity identifier are stored on computing devices that are as close to each other as possible given availability within the data center at the time of storing the extents having the common affinity identifier.