KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ differ applied on each day rather then the entire dataset Re: differ applied on each day rather then the entire dataset

  • rocuinneagain

    Member
    January 12, 2024 at 12:00 am

    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)