The ticker plant enforces (time, sym, …). .Q.dpft makes it (p#sym, time). Does it matter if i make it (time,
p#sym..)? Does `p#sym have to be the second column, the first column after the virtual column to speed things up? Thx.
Hi,
I think this done to be consistent with how the data is sorted.
So when the data is in RDB it is in time order, as indicated by the time column.
When the data is saved to the HDB it is ordered by sym within each date date partition (this is done within .Q.dpft, I’ve highlighted below where the sort below):
k){[d;p;f;t]if[~&/qm’r:+en[d]. .
:t;'unmappable];{[d;t;<b style='"background-color:rgb(255,255,0)"'>i</b>;x]@[d;x;:;t[x]<b style='"background-color:rgb(255,255,0)"'>i</b>]}[d:par[d;p;t];r;<b style='"background-color:rgb(255,255,0)"'><r f</b>]'!r;@[;f;
p#]@[d;`.d;:;f,r@&~f=r:!r];t}
`p# sym doesn’t have to be the second column, it shouldn’t make any difference to performance.
Regards,
Paul
AquaQ Analytics
Where did you learn K? Where can I learn K?
the best place to start is by reading q.k that comes with the q binary. it implements many of the q operators.
type a single backslash at the q) prompt and you’ll exit q and descend into k.
q)\
x:1 2 3
*x / first
1
|x / reverse
3 2 1
$x / string
(,“1”;,“2”;,“3”)