【问题标题】:KDB - Ways to overcome limit error through IPC callKDB - 通过 IPC 调用克服限制错误的方法
【发布时间】:2021-09-23 03:26:39
【问题描述】:

通过 IPC 将大报价表调用到内存时出现 KDB 限制错误。

希望在查询下方找到更好的结构来克服。使用 3.3 版

h:hopen....

q) .z.K
(Roundtrip: 078ms)
3.3

q) qtdata:h"select from qtTbl where date=2021.09.22"
(Roundtrip: 00:13.046)
ERROR: 'limit 
(tried to generate a list with more than 2,000,000,000 elements (keep in mind that any IPC result is a byte list, hence can't be longer than 2 metric Gb))```

提前致谢

【问题讨论】:

    标签: kdb


    【解决方案1】:

    我会尝试按时间、符号或其他一些合理的指标对其进行切片。例如,

    qtSyms: h"exec sym from select distinct sym from qtTbl where date=2021.09.22";
    qtdata: raze h each {select from qtTbl where date=2021.09.22, sym=x},/:qtSyms;
    
    // Less functional, but easier to understand
    // raze {h({select from qtTbl where date=2021.09.22, sym=x};x)} each qtSyms
    

    【讨论】:

      猜你喜欢
      • 2023-03-10
      • 2018-05-13
      • 2021-08-28
      • 2016-02-08
      • 2019-11-30
      • 2021-05-02
      • 2012-12-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多