KX Community

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

Home Forums KX Academy Trades table parted by sym and sorted by time (within each sym)

  • Trades table parted by sym and sorted by time (within each sym)

    Posted by RCQT on November 5, 2024 at 10:34 pm

    Hi Community,

    Here in the official document (aj, aj0, ajf, ajf0 – as-of join | Reference | kdb+ and q documentation – kdb+ and q documentation), it mentions that: for in-memory tables, the performance of asof join can be improved if column c1 is grouped, and column c2 is sorted within c1.

    Suppose that we sort a trade table (t) by sym, time (`sym`time xasc t) and apply a parted attribute on sym.

    If we do the following, “meta select from t where sym=`AAPL”, we can see that the time column of the result table does not have a sorted attribute (even though it’s sorted).

    My question is: how does kdb+/q know whether c2 is sorted or not within c1 when performing the speedup for aj?

    Can you please advise? Thanks.

    • This discussion was modified 1 week ago by  RCQT.
    • This discussion was modified 1 week ago by  RCQT.
    RCQT replied 1 week ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

Log in to reply.