Home › Forums › kdb+ › differ applied on each day rather then the entire dataset › Re: differ applied on each day rather then the entire dataset
-
differ is not one of the aggregations which will auto perform map-reduce
https://code.kx.com/q4m3/14_Introduction_to_Kdb+/#1437-map-reduce
In this case the operation is applied once per partition.
To have it operate on your full result set you can change your query to query the data from disk untouched and then perform the aggregation in memory:
select diffDate:differ startDate from select startDate from tab where date within(.z.d-2;.z.d-1)