mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-10-07 12:22:41 +00:00
Use specialized optional and multivalued column indexes for single-column exists queries, while retaining a generic fallback for dynamic column unions. Implement seek_danger with direct value checks to avoid unnecessary scans. ``` exists column populated in 0.1% of docs (sparse blocks) optional Avg: 0.0406ms (-99.83%) Median: 0.0395ms (-99.84%) [0.0367ms .. 0.0496ms] Output: 4_836 multivalued Avg: 0.0432ms (-99.85%) Median: 0.0424ms (-99.86%) [0.0401ms .. 0.0503ms] Output: 4_836 column populated in 10% of docs (dense blocks) optional Avg: 6.1052ms (-52.67%) Median: 6.1089ms (-51.50%) [5.9257ms .. 6.2702ms] Output: 499_966 multivalued Avg: 6.5485ms (-64.36%) Median: 6.4573ms (-64.12%) [6.3324ms .. 8.0991ms] Output: 499_966 column populated in 90% of docs (dense blocks) optional Avg: 12.9950ms (+14.89%) Median: 12.8676ms (+14.74%) [12.6985ms .. 14.3235ms] Output: 4_498_850 multivalued Avg: 15.7813ms (-39.05%) Median: 15.6722ms (-39.20%) [15.5501ms .. 16.6724ms] Output: 4_498_850 term_AND_exists term matches 0.01% of docs, column populated in 0.1% (sparse blocks) optional Avg: 7381ns (-99.70%) Median: 7030ns (-99.72%) [6798ns .. 0.0144ms] Output: 1 multivalued Avg: 8435ns (-99.74%) Median: 7372ns (-99.75%) [7152ns .. 0.0313ms] Output: 1 term matches 1% of docs, column populated in 0.1% (sparse blocks) optional Avg: 0.1047ms (-99.52%) Median: 0.1045ms (-99.52%) [0.1040ms .. 0.1072ms] Output: 51 multivalued Avg: 0.1070ms (-99.59%) Median: 0.1069ms (-99.58%) [0.1063ms .. 0.1097ms] Output: 51 term matches 50% of docs, column populated in 0.1% (sparse blocks) optional Avg: 0.2970ms (-98.72%) Median: 0.2839ms (-98.76%) [0.2648ms .. 0.3446ms] Output: 2_405 multivalued Avg: 0.2952ms (-98.95%) Median: 0.2923ms (-98.96%) [0.2641ms .. 0.3283ms] Output: 2_405 term matches 0.01% of docs, column populated in 10% (dense blocks) optional Avg: 0.0124ms (-48.17%) Median: 0.0124ms (-47.62%) [0.0120ms .. 0.0131ms] Output: 50 multivalued Avg: 0.0196ms (-46.61%) Median: 0.0197ms (-46.21%) [0.0184ms .. 0.0205ms] Output: 50 term matches 1% of docs, column populated in 10% (dense blocks) optional Avg: 0.8094ms (-44.69%) Median: 0.8021ms (-44.60%) [0.7787ms .. 0.9247ms] Output: 5_023 multivalued Avg: 0.8439ms (-58.79%) Median: 0.8325ms (-58.70%) [0.8099ms .. 0.9976ms] Output: 5_023 term matches 50% of docs, column populated in 10% (dense blocks) optional Avg: 12.3175ms (-32.65%) Median: 12.3049ms (-32.54%) [12.1053ms .. 12.8036ms] Output: 249_853 multivalued Avg: 12.7152ms (-46.31%) Median: 12.6789ms (-46.23%) [12.5517ms .. 13.0544ms] Output: 249_853 term matches 0.01% of docs, column populated in 90% (dense blocks) optional Avg: 0.0627ms (+3.59%) Median: 0.0640ms (+5.17%) [0.0557ms .. 0.0680ms] Output: 439 multivalued Avg: 0.1168ms (+1.16%) Median: 0.1173ms (+1.90%) [0.1050ms .. 0.1226ms] Output: 439 term matches 1% of docs, column populated in 90% (dense blocks) optional Avg: 0.5377ms (-0.19%) Median: 0.5346ms (-0.26%) [0.5308ms .. 0.5550ms] Output: 45_342 multivalued Avg: 0.6365ms (-31.29%) Median: 0.6351ms (-30.75%) [0.6245ms .. 0.6572ms] Output: 45_342 term matches 50% of docs, column populated in 90% (dense blocks) optional Avg: 27.3888ms (-1.86%) Median: 27.3356ms (-1.48%) [27.1377ms .. 28.7410ms] Output: 2_249_485 multivalued Avg: 29.4214ms (-25.34%) Median: 29.3960ms (-25.17%) [29.2107ms .. 30.2541ms] Output: 2_249_485 ```