在Abridged Q Language Manual Arthur提到:
`s#table marks the table to use binary search and marks first column sorted
如果我们查看 3.6 版本:
N:1000000;
t1:t2:([]n:til N; m:N?`6);
t1:update `p#n from t1;
t2:`s#t2;
(meta t1)[`n]`a / `p
(meta t2)[`n]`a / `p
attr t1 / `
attr t2 / `s
\ts:10000 select count i from t1 where n in 1000?N
/ ~7000
\ts:10000 select count i from t2 where n in 1000?N
/ ~7000
我们发现是的,t2
有这个属性:s
。
但由于某种原因,第一列的属性不是s
but p
。而且搜索时间也是一样的。并且具有属性的两个表的大小是相同的——我使用了 AquaQ博客文章中描述的objsize函数来确保。
q
那么 3.6+ 版本的between's#table
和第一列的table
with属性有什么区别吗?'#p