1

对于带有乙烯基引擎的空间,space:len()我有不同的结果。space:count()这些方法返回什么?

4

1 回答 1

4

扫描乙烯基空间并计算确切的数字可能非常昂贵,这就是:len()函数存在的原因。它为您提供快速但近似的结果。如果它对您不起作用,请改用:count()函数。它进行全面扫描并返回正确的结果。

有关更多信息,有关此主题的相关问题和实施提交说明如下:

index.len returns the total number of rows stored in the index.
It is the sum of memory.rows and disk.rows as reported by
index.info. Note, it may be greater than the number of tuples
stored in the space, because it includes DELETE and UPDATE
statements.
于 2020-06-23T08:10:45.337 回答