【问题标题】:What's the shortest way to get the length/dimension of a table in KDB?在 KDB 中获取表的长度/尺寸的最短方法是什么?
【发布时间】:2021-08-14 11:54:11
【问题描述】:

目前我正在做一个select count,这似乎很难实现。

有没有一种简单的长度/大小/维度运算符?

【问题讨论】:

    标签: kdb


    【解决方案1】:

    使用count 和表名是有效的。

    q)count trades
    2000
    

    这比使用虚拟列 i 快很多,因为有关表计数的信息存储在平面文件的标题中。

    q)\t:10000000 select count i from trades
    9910
    q)\t:10000000 count trades
    592
    

    【讨论】:

      猜你喜欢
      • 2013-07-22
      • 1970-01-01
      • 2019-06-24
      • 1970-01-01
      • 2010-12-14
      • 2015-10-04
      • 2013-12-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多