1. A method of executing a command that includes a window function, the method comprising: during execution of said command, obtaining an input item set that serves as input to said window function; assigning a partition of the input item set to each of a plurality of slave processes; receiving at each of the plurality of slave processes a set of data items that fall within the partition assigned to the slave process; producing a plurality of first results by causing each slave process of the plurality of slave processes to perform a first operation related to the window function on the set of data items received by the slave process; communicating to each of the plurality of slave processes that produced the plurality of first results information that reflects the first results produced by one or more other slave processes of the plurality of slave processes that produced the plurality of first results; and producing a plurality of second results by causing each of the plurality of slave processes to perform a second operation related to the window function based on said information and the data items received by the slave process.