Patent ID: 8301652

Claim:
A method executed by a plurality of processors in a database system, the database system having a temporal table, the method comprising: defining a plurality of consecutive temporal partitions; allocating the temporal partitions to the respective processors; receiving a query to aggregate at least one attribute of the temporal table, wherein the at least one attribute is defined by a plurality of attribute values associated with a plurality of timestamps, and wherein each attribute value is stored in a respective tuple of a column of the temporal table; in response to the query, identifying the plurality of timestamps in the temporal table, wherein each timestamp is a respective starting timestamp or a respective ending timestamp for each attribute; allocating each timestamp to a respective one of the temporal partitions, such that each temporal partition has a similar number of tuples of the temporal table to aggregate; for each of the identified timestamps, computing attribute value changes attribute values having a respective starting timestamp or a respective ending timestamp at the identified timestamp, wherein the computing is performed within each partition using the respective processors to which each partition is allocated, and wherein the attribute value changes are maintained separately during computation of the attribute value changes; and aggregating, subsequent to the computing, the attribute value changes within each partition using the respective processors to which each partition is allocated to produce an aggregate value for the query.