-
Trades table parted by sym and sorted by time (within each sym)
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 month ago by RCQT.
- This discussion was modified 1 month ago by RCQT.
- This discussion was modified 2 weeks, 2 days ago by supportelearningwp-com.
code.kx.com
aj, aj0, ajf, ajf0 – as-of join | Reference | kdb+ and q documentation - kdb+ and q documentation
As-of joins join two tables taking from the second the most recent records prior to the times in the first
Sorry, there were no replies found.
Log in to reply.