Skip to content

Commit 5c4fa18

Browse files
Avoid reading PrimaryKey from disk by using PrimaryKeyWithSource
[java] Result "org.apache.cassandra.test.microbench.index.sai.NEQQueryBench.queryNEQ": [java] 17761666.739 ±(99.9%) 260418.205 ns/op [Average] [java] (min, avg, max) = (17644295.340, 17761666.739, 18241636.689), stdev = 172250.519 [java] CI (99.9%): [17501248.533, 18022084.944] (assumes normal distribution) [java] [java] Benchmark (numRowsWithinPartition) Mode Cnt Score Error Units [java] NEQQueryBench.queryNEQ 1000 avgt 10 2169861.695 ± 11355.830 ns/op [java] NEQQueryBench.queryNEQ 10000 avgt 10 17761666.739 ± 260418.205 ns/op
1 parent 4caf77a commit 5c4fa18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java/org/apache/cassandra/index/sai/disk/PrimaryKeyMapIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected PrimaryKey computeNext()
110110
{
111111
while (currentRowId >= 0 && currentRowId < keys.count())
112112
{
113-
PrimaryKey key = keys.primaryKeyFromRowId(currentRowId++);
113+
PrimaryKey key = keys.primaryKeyFromRowId(currentRowId++, getMinimum(), getMaximum());
114114
if (filter == KeyFilter.KEYS_WITH_CLUSTERING && key.hasEmptyClustering())
115115
continue;
116116
return key;

0 commit comments

Comments
 (0)