为什么 lookup table 在 kdb 中被强制键控以进行左连接
Why is lookup table forced to be keyed for left join in kdb
- 将查找 table 保持为 kdb 中左连接的键控有什么好处?它是否提供性能 benefits/memory 好处以及如何提供?
正如我在下面 table:
t:([]sym:6?`GOOG`AMZN`IBM`AAPL; px:6?10.) /- source table
kt:([sym:`IBM`AAPL`GOOG`AMZN]; vol:4?10000) /- lookup table
t lj kt
- 同样的好处是否也适用于 asof join 因为我读过 Q for Mortals "There is no requirement for any of the join columns to be keys but the join will be faster on keys."
A keyed table 是键控记录到 table 值的字典映射。因此,使用键控 table 连接是字典查找,这在 kdb 中本质上更快。匹配列用于简单地索引到第二个 table。
- 将查找 table 保持为 kdb 中左连接的键控有什么好处?它是否提供性能 benefits/memory 好处以及如何提供?
正如我在下面 table:
t:([]sym:6?`GOOG`AMZN`IBM`AAPL; px:6?10.) /- source table
kt:([sym:`IBM`AAPL`GOOG`AMZN]; vol:4?10000) /- lookup table
t lj kt
- 同样的好处是否也适用于 asof join 因为我读过 Q for Mortals "There is no requirement for any of the join columns to be keys but the join will be faster on keys."
A keyed table 是键控记录到 table 值的字典映射。因此,使用键控 table 连接是字典查找,这在 kdb 中本质上更快。匹配列用于简单地索引到第二个 table。