Skip to content

perf: join hash table redesign (9 hj bench queries 3–8× faster) - #27746

Open
2010YOUY01 wants to merge 6 commits into
apache:mainfrom
2010YOUY01:redesign-join-ht
Open

2010YOUY01 wants to merge 6 commits into
apache:mainfrom
2010YOUY01:redesign-join-ht

Conversation

@2010YOUY01

Copy link
Copy Markdown
Member

Important

Fork CI setup: For pull requests from a fork to main, enable workflows in your fork's Actions tab before you push.
See the fork CI setup guide.

Which issue does this PR close?

Rationale for this change

Background and dependencies

This PR

Despite the large diff, you only need to understand two things to understand this PR:

  • The three-layer architecture of HJ: execution state machine, batched join processor, and join index.
  • The storage design: contiguous duplicate matches, referenced by compact handles and expanded in bounded chunks.

Both are explained in #27398.

Benchmark Result

Comparing hj benchmark with main:

Full benchmark results
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query                                                                         ┃      main ┃ contiguous-hash-table ┃        Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                                         │   1.19 ms │               1.13 ms │     no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                                     │   3.60 ms │               4.75 ms │  1.32x slower │
│ QQuery 3_density=1_prob_hit=1_100K*60M                                        │  56.87 ms │              54.17 ms │     no change │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                                      │ 169.45 ms │             157.14 ms │ +1.08x faster │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                                     │ 615.03 ms │             171.41 ms │ +3.59x faster │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                                   │ 216.87 ms │             199.69 ms │ +1.09x faster │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                                      │ 576.10 ms │             163.39 ms │ +3.53x faster │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                                    │ 205.13 ms │             196.10 ms │     no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                                      │ 577.21 ms │             171.05 ms │ +3.37x faster │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                                   │ 207.57 ms │             206.25 ms │     no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                                     │ 585.61 ms │             175.90 ms │ +3.33x faster │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                                   │ 207.61 ms │             210.07 ms │     no change │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                                    │ 609.96 ms │             181.81 ms │ +3.35x faster │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                                  │ 219.20 ms │             216.94 ms │     no change │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M                        │ 190.67 ms │             172.71 ms │ +1.10x faster │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                              │   1.30 ms │               1.42 ms │  1.09x slower │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                             │  59.53 ms │              58.72 ms │     no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                           │  71.43 ms │              75.05 ms │  1.05x slower │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                              │   1.11 ms │               1.12 ms │     no change │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                             │  52.77 ms │              54.45 ms │     no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                           │  77.85 ms │              77.53 ms │     no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi             │  80.52 ms │              77.66 ms │     no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count           │  90.49 ms │              26.37 ms │ +3.43x faster │
│ QQuery 24_density=1_prob_hit=1_3K_(single_hot_bucket)*20K_long_keys_count     │ 276.68 ms │              35.65 ms │ +7.76x faster │
│ QQuery 25_density=1_prob_hit=1_20K_(fanout~78_multi_key)*240K_multi_key_count │ 113.04 ms │              24.99 ms │ +4.52x faster │
│ QQuery 26_density=1_prob_hit=0.027_270K_dense_keys*15M                        │  43.45 ms │              44.15 ms │     no change │
│ QQuery 27_density=0.027_prob_hit=0.027_270K_sparse_keys*15M                   │  51.51 ms │              45.08 ms │ +1.14x faster │
│ QQuery 28_density=0.01_prob_hit=0.2_6M_(1.5M_one_key)*100K_count              │ 512.27 ms │              87.67 ms │ +5.84x faster │
└───────────────────────────────────────────────────────────────────────────────┴───────────┴───────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                    ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (main)                    │ 5874.02ms │
│ Total Time (contiguous-hash-table)   │ 2892.38ms │
│ Average Time (main)                  │  209.79ms │
│ Average Time (contiguous-hash-table) │  103.30ms │
│ Queries Faster                       │        13 │
│ Queries Slower                       │         3 │
│ Queries with No Change               │        12 │
│ Queries with Failure                 │         0 │
└──────────────────────────────────────┴───────────┘

What changes are included in this PR?

Suggested reading order:

  1. hash_join/mod.rs — comments explain the three-layer hash join architecture.
  2. join_index.rs — JoinIndexMap: this PR introduces a new layer for the physical hash table implementation (all changes are inside BatchedJoinProcessor, without changing the state machine).
  3. join_index/directory.rs — JoinHashIndex: join hash table implementation.
  4. batched_join_processor.rs — BatchedJoinProcessor: interaction between the raw hash index and the join processor.
  5. directory/dense.rs — DenseIntegerDirectory: specialization 1.
  6. directory/integer.rs — IntegerDirectory: specialization 2.

What is the testing strategy for this PR?

  • Existing tests
  • Added coverage in join_exact_index.slt (TODO for myself: check for overlap with existing tests.)

Are there any user-facing changes?

No SQL behavior changes.

@github-actions github-actions Bot added sqllogictest SQL Logic Tests (.slt) physical-plan Changes to the physical-plan crate labels Nov 25, 2026
@2010YOUY01

2010YOUY01 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member Author

Notes for the reviewer

What I've reviewed carefully in this PR:

  • Physical hash table layout.
  • Main API design and documentation.

Still to refine (I'm working on these in parallel with the initial reviews):

  • Implementation and comments within functions and utilities.
  • Low-level optimizations: I've run end-to-end benchmarks, but haven't profiled with flamegraphs yet; some code still looks suboptimal.

Possible PR split:

Below are possible PR splits; whether and how to split depends on reviewers' preferences, though I currently lean toward shipping them together and iterating in follow-up PRs to finish the HJ refactor sooner and reduce disruption to ongoing development.

  1. Join index API and general SwissTable implementation.
  2. Dense integer specialization: direct array indexing for compact key ranges.
  3. Single-integer-key specialization: inline keys to avoid indirect build-key reads during equality checks.
  • The integer specialization is already a separate commit and easy to extract.
  • Separating the SwissTable and dense implementations requires temporary compatibility code, which makes parts of the split harder to review.

TODO for myself:

  • verify test coverage
  • check full benchmark (tpch/tpchds/...)
  • Invetigate hj Q2 regression
  • Cleanups mentioned above

CC @mbutrovich @jayzhan211 @andygrove

@rusanoph

Copy link
Copy Markdown

I'd like to share the results of an independent research study relevant to this hash join redesign.

I recently published When Contiguous Hash Joins Pay Off in DuckDB and DataFusion, motivated by Birler et al.'s Unchained hash table paper (DaMoN 2024).

The study includes experimental integrations into DuckDB 1.5.6 and DataFusion 55.2.0, an analytical break-even model, and reproducible artifacts backed by 24,282 benchmark observations.

In DataFusion, automatic CSR selection reduced aggregate query time compared to native execution in single-threaded experiments:

Workload Queries Time reduction
SNAP graph self-joins 35 73%
JOB 100 11.7%
TPC-H SF10 20 2.6%
TPC-DS SF10 94 0.1%

A particularly interesting finding is the workload-dependent cost of constructing contiguous layouts. Lowering the build threshold from 200K to 50K rows yielded a 2.177× speedup on 12 held-out graph queries, while producing essentially no change on 31 affected analytical queries.

The paper also examines why build-side multiplicity alone is insufficient to characterize probe demand and derives a break-even condition accounting for both key distributions and layout construction costs.

Research artifacts:

Although my experimental implementation differs from the design proposed here, I believe these findings and graph workloads could complement the existing hj benchmarks.

I'd be interested in contributing comparative benchmark results for this redesign and discussing potential follow-up optimizations.

@mbutrovich

Copy link
Copy Markdown
Contributor

I'd be interested in contributing comparative benchmark results for this redesign and discussing potential follow-up optimizations.

@rusanoph Thanks, that would help. This PR differs from your CSR adapter in what the build moves and when. It keeps one directory entry per distinct key and stores a key with one row inline in that entry. Only the row IDs of repeated keys move into contiguous groups, and that happens in the same pass that builds the directory. There is no second organization pass and no admission gate. The hj queries closest to your low-probe cases are Q4 and Q6 to Q14 (even). They build about 60M lineitem rows, because the benchmark turns off join reordering, and probe 100K rows, of which 10% match. The PR description shows them unchanged to 1.09x faster. The build still costs more than on main: in my profiles of Q4 and Q5 it takes about 2.8x the CPU of main's build, and the queries come out faster only because the probe gain is larger. Results from your SNAP and JOB workloads on this branch against main would be the most useful, including the query shapes where your adapter lost time.

@mbutrovich mbutrovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@2010YOUY01 thanks for bringing the hash table work together here. The layout matches #27398. Building the groups in the same pass as the directory also avoids the second pass that made #26447 1% to 10% slower on the low-hit hj queries.

Could you also run the imdb (JOB) suite, along with the TPC-H and TPC-DS runs on your list? In the study linked in #27746 (comment), JOB is where contiguous groups gave DataFusion its largest gain outside the graph workloads (11.7% of total time, Table 1). It also has joins with large builds and few probes, so it should show both the gain and the build-side cost.

Comment on lines +66 to +77
let scratch = reservation.new_empty();
// Keep validity unions and per-column metadata charged for every layout.
// Dense keys are read directly, so only hash-based directories need hashes.
scratch.try_grow(num_rows.div_ceil(8) * (keys.len() + 1) + keys.len() * 256)?;
let hashes = if dense_range.is_none() {
scratch.try_grow(num_rows * size_of::<u64>() + hash_scratch_bytes(keys))?;
let mut hashes = vec![0; num_rows];
create_hashes(keys, random_state, &mut hashes)?;
hashes
} else {
Vec::new()
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

datafusion/physical-plan/src/joins/join_index/directory.rs lines 66-77

This hashes the whole build side into one Vec<u64>, 8 bytes per row, held for the whole build. On main the build hashes slices of at most hash_chunk_rows rows (exec.rs), which #26793 added to keep that buffer near one batch.

Together with the up-front MatchedGroupsBuilder reservation (next comment), this raises the build's peak reservation. I measured it with PeakRecordingPool on a CollectLeft inner join with 1M Int64 build rows in 8192-row batches and three probe rows:

Build keys main This PR
Hash path, unique 55.7 MB 73.9 MB
Hash path, 100 rows per key 55.7 MB 78.0 MB
Dense, unique 32.0 MB 34.3 MB
Dense, 100 rows per key 32.0 MB 34.4 MB

A build that fits under a memory limit on main can fail with this PR. Could the directories insert one slice at a time, sized by hash_chunk_rows, so the hash buffer stays bounded as it is on main?

@rusanoph rusanoph Nov 25, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to reproduce the memory-limit regression on x86-64 using controlled workloads similar to those in your review: 1M build rows, 8,192-row batches and three probe rows.

A is the main merge-base, B is this PR, and C includes the dense counting-sort patch.

Build shape Peak pool A / B / C (MiB) Successful runs at 64 MiB (A / B / C)
Dense unique 22.95 / 32.66 / 22.95 5 / 5 / 5
Dense duplicates 30.58 / 32.78 / 30.58 5 / 5 / 5
Sparse integer unique 53.07 / 70.48 / 70.48 5 / 0 / 0
Sparse integer duplicates 53.07 / 74.37 / 74.37 5 / 0 / 0

Both sparse integer cases consistently succeed on A but return ResourcesExhausted on B and C under the same memory-pool limit.

The counting-sort patch restores the baseline pool watermark for the dense cases, but the non-dense resource regression remains.

The current experiment does not isolate the individual contributions of the whole-build hash buffer and the group-builder reservations.

Memory report, fixtures, raw measurements and failure evidence

If this is intended to be addressed in a follow-up PR, I'd be interested in helping with the regression tests or investigating the allocation overhead further.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • RE hashing in chunk: addressed in 8282c74
  • MatchedGroupsBuilder conservative reservation: I'll address it after more perf investigations on other benchmarks

Comment on lines +129 to +153
pub(super) fn new(num_rows: usize, reservation: &MemoryReservation) -> Result<Self> {
// Estimate the memory and update the reservation. The conservative estimation
// is on purpose for simplicity.
// Each group needs at least two rows; each key's first row is not pending.
// E.g. [A, A, A] has one group and two pending rows.
let max_groups = num_rows / 2;
let max_pending = num_rows.saturating_sub(1);
let bytes = max_groups
.checked_mul(size_of::<T>() + size_of::<usize>())
.and_then(|bytes| {
let pending_bytes = max_pending.checked_mul(size_of::<(T, T)>())?;
bytes.checked_add(pending_bytes)
})
.ok_or_else(|| {
exec_datafusion_err!("Join group construction size overflow")
})?;
let reservation = reservation.new_empty();
reservation.try_grow(bytes)?;
Ok(Self {
first_rows: Vec::with_capacity(max_groups),
counts: Vec::with_capacity(max_groups),
pending: Vec::with_capacity(max_pending),
_reservation: reservation,
})
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new reserves and allocates for the worst case before it sees any row. With u32 IDs that's num_rows / 2 groups at 12 bytes each plus num_rows - 1 pending pairs at 8 bytes each, about 14 bytes per build row, or 28 with u64 IDs. A unique build pushes nothing but still holds the whole reservation. finish then reserves the groups while this reservation is still held. That's why the duplicate-heavy rows in the table above are 4 MB higher than the unique ones.

Could add_duplicate grow these vectors through the reservation as rows arrive, returning Result? Unique builds would then pay nothing, and duplicate-heavy builds would pay only for their duplicate rows. Storing counts as T instead of usize would also halve that vector with u32 IDs.

Comment on lines +102 to +132
for (row, &hash) in hashes.iter().enumerate() {
if valid.is_some_and(|valid| valid.is_null(row)) {
continue;
}
match table.entry(
hash,
|entry| {
entry.hash == hash
&& comparator.is_equal(entry.representative_row.as_index(), row)
},
|entry| entry.hash,
) {
Entry::Occupied(mut entry) => {
let entry = entry.get_mut();
let mut handle = entry.matches();
groups.add_duplicate(&mut handle, T::from_index(row));
let MatchHandle::Group(group) = handle else {
unreachable!()
};
entry.group_plus_one = T::from_index(group.as_index() + 1);
}
Entry::Vacant(entry) => {
let row = T::from_index(row);
entry.insert(KeyEntry {
hash,
representative_row: row,
group_plus_one: T::default(),
});
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loop checks key equality for every build row whose hash matches an existing entry, with one boxed JoinKeyComparator call per row and key column. On main the build compares hashes only (join_hash_map.rs), and the probe compares keys for each candidate pair. So the PR moves equality work from probe pairs to build rows, which pays off when the build is probed often.

The hj queries with string or composite keys (Q23 to Q25) build at most 32K rows, so nothing measures this loop on a large duplicate-heavy build with few probes. Could we add an hj query of that shape, for example a few million build rows on a long string key with about 100 rows per key and a 1% hit rate? If the loop shows up in that query, the probe side of this PR already compares keys in batches (compare_column). DuckDB's build does the same: it collects the rows whose salt matches an existing entry, then compares their keys in one vectorized pass (join_hashtable.cpp).

@2010YOUY01 2010YOUY01 Nov 26, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree there is some extra overhead for such workload.

The hj benchmark is extended as suggested in #27766

The result is approximately main: 20ms, PR: 23ms on my Mac. My interpretation is that the additional cost scales linearly with the build-side size and is unlikely to cause pathological end-to-end slowdowns, since hash table construction is not a bottleneck for the overall query now.

However we could still explore whether there are any straightforward ways to speed it up.

Comment on lines +128 to +178
for (row, &key) in key_array.values().iter().enumerate() {
if valid.is_some_and(|valid| valid.is_null(row)) {
continue;
}
if key_array.is_null(row) {
match &mut dense.null {
Some(handle) => groups.add_duplicate(handle, T::from_index(row)),
slot @ None => {
*slot = Some(MatchHandle::One(T::from_index(row)));
dense.distinct += 1;
}
}
continue;
}

let key: u64 = key.as_();
let position = key.wrapping_sub(min);
if position >= len as u64 {
return internal_err!("Build key is outside the dense join index range");
}
let position = position as usize;
let slot = dense.slots[position].as_index();

if slot == 0 {
dense.slots[position] = T::from_index(row + 1);
dense.distinct += 1;
continue;
}
// E.g. key 10 at rows 0 and 2: One(0) becomes Group(0) -> [0, 2].
let already_group = group_flags
.as_ref()
.is_some_and(|flags| flags.get_bit(position));
let mut handle = if already_group {
MatchHandle::Group(T::from_index(slot - 1))
} else {
MatchHandle::One(T::from_index(slot - 1))
};
groups.add_duplicate(&mut handle, T::from_index(row));
let MatchHandle::Group(group) = handle else {
unreachable!()
};
// Allocate group flags only when a non-NULL key repeats.
if group_flags.is_none() {
reservation.try_grow(bitmap_bytes(len))?;
let mut flags = BooleanBufferBuilder::new(len);
flags.append_n(len, false);
group_flags = Some(flags);
}
group_flags.as_mut().unwrap().set_bit(position, true);
dense.slots[position] = T::from_index(group.as_index() + 1);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On duplicate-heavy dense keys this build takes about 2.8x the CPU of the ArrayMap build on main. I profiled dfbench hj with samply on SF10 (20 iterations per query, the profiling profile with thin LTO) and summed the CPU under build_in_memory across threads:

Query main This PR
Q2 59 ms 111 ms
Q4 3,209 ms 8,871 ms
Q5 3,277 ms 8,951 ms
Q28 1,088 ms 1,201 ms

Q4 and Q5 build about 60M lineitem rows over dense keys with about 600 rows per key. There, the build functions take 28% (Q4) and 23% (Q5) of the query's CPU. Q4 and Q5 are still faster overall because the probe gain is larger. Q2 is not. With join reordering off, its build side is the 1.5M customer rows over 25 keys, so this build cost is the Q2 regression.

In Q4, about a quarter of the build time is in add_duplicate: the out-of-line call for each duplicate row, the handle match, counts[group] += 1, and the pending push. About a fifth is the pending scatter in finish. About a seventh is the checked RowId::from_index conversions, and the rest is this loop. These shares are approximate, because they come from sampling.

I tried a counting sort for the dense directory. It counts each slot's rows (slots[key - min] += 1), gives each repeated key a range of rows, and then scatters the row IDs in a second pass over the keys, using each group's slot as its write cursor. It keeps build order, and a slot with one row still holds One(row). It needs no MatchedGroupsBuilder, so for dense keys the pending and first_rows memory from the MatchedGroupsBuilder::new comment goes away. It is the exact dense variant in the study linked above (section 5.2). The patch against this PR's head is below.

On the same machine, with main, this PR, and the patch interleaved over three rounds (medians of 54 iterations each):

Query main This PR Counting sort
Q2 2.99 ms 3.41 ms 2.80 ms
Q4 110.89 ms 103.24 ms 87.11 ms
Q5 402.08 ms 116.51 ms 100.79 ms
Q26 30.37 ms 29.99 ms 29.86 ms
Q23 (general directory, unchanged) 84.85 ms 18.74 ms 19.19 ms

Build CPU drops from 8,871 ms to 5,607 ms on Q4 and from 8,951 ms to 5,206 ms on Q5. That's still above main's 3,209 ms, because scattering 60M row IDs into rows is the price of contiguous groups. My first version iterated with try_for_each. It was slower than this PR, because the per-row closure didn't inline, so plain loops matter here. These numbers are from an Apple M5 Max and need confirming on x86. Could the dense directory use this approach, or something like it?

Counting sort for the dense directory, against 2f6c665
diff --git a/datafusion/physical-plan/src/joins/join_index/directory.rs b/datafusion/physical-plan/src/joins/join_index/directory.rs
index 6ff1580fd..803f3eeb3 100644
--- a/datafusion/physical-plan/src/joins/join_index/directory.rs
+++ b/datafusion/physical-plan/src/joins/join_index/directory.rs
@@ -304,22 +304,21 @@ impl<T: RowId> JoinHashIndex<T> {
         reservation: &MemoryReservation,
         random_state: &RandomState,
     ) -> Result<Self> {
-        let mut groups = MatchedGroupsBuilder::new(keys[0].len(), reservation)?;
         let valid = matchable_join_keys(keys, null_equality);
-        let directory = if let Some(range) = dense_range {
+        if let Some(range) = dense_range {
             let key = match keys {
                 [key] if ArrayMap::is_supported_type(key.data_type()) => key,
                 _ => return internal_err!("Dense join index requires one integer key"),
             };
-            DenseIntegerDirectory::build(
-                key,
-                valid.as_ref(),
-                range,
-                reservation,
-                &mut groups,
-            )
-            .map(KeyDirectory::Dense)?
-        } else if let Some(hash_key) = (keys.len() == 1)
+            let (directory, groups) =
+                DenseIntegerDirectory::build(key, valid.as_ref(), range, reservation)?;
+            return Ok(Self {
+                directory: KeyDirectory::Dense(directory),
+                groups,
+            });
+        }
+        let mut groups = MatchedGroupsBuilder::new(keys[0].len(), reservation)?;
+        let directory = if let Some(hash_key) = (keys.len() == 1)
             .then(|| integer_hasher(keys[0].data_type()))
             .flatten()
         {
diff --git a/datafusion/physical-plan/src/joins/join_index/directory/dense.rs b/datafusion/physical-plan/src/joins/join_index/directory/dense.rs
index f40174ab5..a7c4f4bd0 100644
--- a/datafusion/physical-plan/src/joins/join_index/directory/dense.rs
+++ b/datafusion/physical-plan/src/joins/join_index/directory/dense.rs
@@ -15,12 +15,28 @@ use num_traits::AsPrimitive;
 
 use super::super::keys::LookupScratch;
 use super::super::matches::{
-    JoinHashLookup, MatchHandle, MatchHandleArray, MatchedGroupsBuilder, RowId,
-    UniqueMatches, bitmap_bytes,
+    JoinHashLookup, MatchHandle, MatchHandleArray, MatchedGroups, RowId, UniqueMatches,
+    bitmap_bytes,
 };
 use super::Probe;
 use crate::joins::array_map::ArrayMap;
 
+/// Runs `$body` for each row that `$valid` keeps. Plain loops, unlike
+/// `try_for_each`, let the body inline, and builds without NULL keys get a
+/// separate loop.
+macro_rules! for_each_valid {
+    ($len:expr, $valid:expr, |$row:ident| $body:block) => {
+        match $valid {
+            Some(valid) => {
+                for $row in valid.valid_indices() $body
+            }
+            None => {
+                for $row in 0..$len $body
+            }
+        }
+    };
+}
+
 /// Direct lookup for a single integer join key in a compact range.
 ///
 /// # Overview
@@ -78,110 +94,123 @@ impl<T: RowId> DenseIntegerDirectory<T> {
         valid: Option<&NullBuffer>,
         range: (u64, u64),
         reservation: &MemoryReservation,
-        groups: &mut MatchedGroupsBuilder<T>,
-    ) -> Result<Self> {
+    ) -> Result<(Self, MatchedGroups<T>)> {
         // Dispatch once per column; the typed build reads values without a copy.
         downcast_integer_array!(
-            key_array => {
-                Self::build_typed(key_array, valid, range, reservation, groups)
-            }
+            key_array => Self::build_typed(key_array, valid, range, reservation),
             _ => internal_err!("Dense join index requires an integer key"),
         )
     }
 
+    /// Counting sort: count each slot's rows, give each repeated key a
+    /// contiguous range, then scatter the row IDs in build order.
+    ///
     /// See [`Self::build`] for shared argument documentation.
     fn build_typed<K: ArrowPrimitiveType>(
         key_array: &PrimitiveArray<K>,
         valid: Option<&NullBuffer>,
         (min, max): (u64, u64),
         reservation: &MemoryReservation,
-        groups: &mut MatchedGroupsBuilder<T>,
-    ) -> Result<Self>
+    ) -> Result<(Self, MatchedGroups<T>)>
     where
         K::Native: AsPrimitive<u64>,
     {
-        // Step 1: Sanity check
         let range = ArrayMap::calculate_range(min, max);
         if range >= usize::MAX as u64 {
             return internal_err!("Dense join index key range is too large");
         }
-
-        // Step 2: update memory reservation
+        // `array_map_key_range` rejects NULL-equal builds with NULL keys.
+        if valid.is_none() && key_array.null_count() > 0 {
+            return internal_err!("Dense join index cannot store NULL keys");
+        }
         let len = range as usize + 1;
         let bytes = len
             .checked_mul(size_of::<T>())
             .ok_or_else(|| exec_datafusion_err!("Dense join index size overflow"))?;
         reservation.try_grow(bytes)?;
+        let values = key_array.values();
 
-        // Step 3: initialize flat array directory
-        let mut dense = Self {
-            offset: min,
-            slots: vec![T::default(); len],
-            is_group: None,
-            null: None,
-            distinct: 0,
-            build_unique: true,
-        };
-        let mut group_flags: Option<BooleanBufferBuilder> = None;
+        // Pass 1: count rows per slot. Counts fit `T` because the row count does.
+        let mut slots = vec![T::default(); len];
+        for_each_valid!(values.len(), valid, |row| {
+            let position = values[row].as_().wrapping_sub(min);
+            if position >= len as u64 {
+                return internal_err!("Build key is outside the dense join index range");
+            }
+            let slot = &mut slots[position as usize];
+            *slot = T::usize_as(slot.as_usize() + 1);
+        });
 
-        // Step 4: build the index
-        for (row, &key) in key_array.values().iter().enumerate() {
-            if valid.is_some_and(|valid| valid.is_null(row)) {
-                continue;
+        // Pass 2: give each repeated key a group and a range of `rows`.
+        let (mut distinct, mut num_groups, mut grouped_rows) = (0, 0, 0);
+        for slot in &slots {
+            let count = slot.as_usize();
+            distinct += usize::from(count != 0);
+            if count > 1 {
+                num_groups += 1;
+                grouped_rows += count;
             }
-            if key_array.is_null(row) {
-                match &mut dense.null {
-                    Some(handle) => groups.add_duplicate(handle, T::from_index(row)),
-                    slot @ None => {
-                        *slot = Some(MatchHandle::One(T::from_index(row)));
-                        dense.distinct += 1;
-                    }
+        }
+        let mut is_group = None;
+        let mut offsets = Vec::new();
+        let mut rows = Vec::new();
+        if num_groups > 0 {
+            reservation.try_grow(
+                bitmap_bytes(len)
+                    + (num_groups + 1) * size_of::<usize>()
+                    + grouped_rows * size_of::<T>(),
+            )?;
+            // A group's slot holds its next write position until pass 3 ends.
+            let mut flags = BooleanBufferBuilder::new(len);
+            flags.append_n(len, false);
+            offsets.reserve_exact(num_groups + 1);
+            offsets.push(0);
+            for (position, slot) in slots.iter_mut().enumerate() {
+                let count = slot.as_usize();
+                if count > 1 {
+                    let start = offsets[offsets.len() - 1];
+                    *slot = T::usize_as(start);
+                    offsets.push(start + count);
+                    flags.set_bit(position, true);
                 }
-                continue;
             }
+            let flags = flags.finish();
+            rows = vec![T::default(); grouped_rows];
 
-            let key: u64 = key.as_();
-            let position = key.wrapping_sub(min);
-            if position >= len as u64 {
-                return internal_err!("Build key is outside the dense join index range");
-            }
-            let position = position as usize;
-            let slot = dense.slots[position].as_index();
+            // Pass 3: a single row's slot takes its row ID, and a group's row
+            // goes to the slot's write position. Pass 1 checked every position.
+            for_each_valid!(values.len(), valid, |row| {
+                let position = values[row].as_().wrapping_sub(min) as usize;
+                let slot = &mut slots[position];
+                if flags.value(position) {
+                    rows[slot.as_usize()] = T::usize_as(row);
+                    *slot = T::usize_as(slot.as_usize() + 1);
+                } else {
+                    *slot = T::usize_as(row + 1);
+                }
+            });
 
-            if slot == 0 {
-                dense.slots[position] = T::from_index(row + 1);
-                dense.distinct += 1;
-                continue;
+            // Pass 4: replace each group's write position with its group ID.
+            for (group, position) in flags.set_indices().enumerate() {
+                slots[position] = T::usize_as(group + 1);
             }
-            // E.g. key 10 at rows 0 and 2: One(0) becomes Group(0) -> [0, 2].
-            let already_group = group_flags
-                .as_ref()
-                .is_some_and(|flags| flags.get_bit(position));
-            let mut handle = if already_group {
-                MatchHandle::Group(T::from_index(slot - 1))
-            } else {
-                MatchHandle::One(T::from_index(slot - 1))
-            };
-            groups.add_duplicate(&mut handle, T::from_index(row));
-            let MatchHandle::Group(group) = handle else {
-                unreachable!()
-            };
-            // Allocate group flags only when a non-NULL key repeats.
-            if group_flags.is_none() {
-                reservation.try_grow(bitmap_bytes(len))?;
-                let mut flags = BooleanBufferBuilder::new(len);
-                flags.append_n(len, false);
-                group_flags = Some(flags);
-            }
-            group_flags.as_mut().unwrap().set_bit(position, true);
-            dense.slots[position] = T::from_index(group.as_index() + 1);
+            is_group = Some(flags);
+        } else {
+            for_each_valid!(values.len(), valid, |row| {
+                let position = values[row].as_().wrapping_sub(min) as usize;
+                slots[position] = T::usize_as(row + 1);
+            });
         }
 
-        // Step 5: Freeze the group bitmap; without grouped slots it stays None.
-        dense.is_group = group_flags.map(|mut flags| flags.finish());
-        // Include NULL groups, which do not appear in the slot bitmap.
-        dense.build_unique = !groups.has_groups();
-        Ok(dense)
+        let dense = Self {
+            offset: min,
+            slots,
+            is_group,
+            null: None,
+            distinct,
+            build_unique: num_groups == 0,
+        };
+        Ok((dense, MatchedGroups { offsets, rows }))
     }
 
     pub(super) fn lookup_batch(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested your exact patch on x86-64 (Ryzen 5 7500F, WSL2), using the official dfbench hj SF10 workload with one logical CPU and one execution partition.

A is the main merge-base 6a06058, B is PR head 2f6c665, and C is B with your counting-sort patch.

Query A (ms) B (ms) C (ms) Paired B/C [95% CI]
Q2 16.27 18.95 12.07 1.569 [1.524, 1.603]
Q4 1749.89 1780.93 1267.06 1.415 [1.360, 1.435]
Q5 8115.49 2011.94 1404.90 1.432 [1.309, 1.462]

The patch reverses the Q2 regression and improves Q4 and Q5, consistent with your M5 Max observations. The B/C confidence intervals for Q23, Q26 and Q28 include parity.

Another interesting result is peak memory-pool reservation on Q4:

  • A: 915.31 MiB
  • B: 1506.78 MiB
  • C: 915.31 MiB

Q5 shows the same pattern. The full-result correctness checks agreed across all three arms for all six queries.

These measurements support the proposed counting-sort approach for the dense directory. I couldn't collect sampled build CPU under the installed WSL kernel, so the timing comparison is based on elapsed time rather than sampled CPU time.

Full x86 validation report and supporting evidence

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good point, addressed in a5532d7

Comment on lines +132 to +141
if key_array.is_null(row) {
match &mut dense.null {
Some(handle) => groups.add_duplicate(handle, T::from_index(row)),
slot @ None => {
*slot = Some(MatchHandle::One(T::from_index(row)));
dense.distinct += 1;
}
}
continue;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_map_key_range doesn't pick the dense directory when NULLs equal NULLs and the key has NULLs (exec.rs). Under NullEqualsNothing, the valid check above skips NULL rows. So null is always None in a dense directory built by HashJoinExec, and this branch, the NULL handling in lookup, and the NULL case in contain_keys never run. The IS NOT DISTINCT FROM case at line 178 of join_exact_index.slt goes through IntegerDirectory for that reason. Should we drop this code and return an internal error if a dense build sees a matchable NULL?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaned up in baa77ff, I think support for nulls in the dense directory can be added in the future.

Comment on lines +34 to +47
/// Maps exact join keys (one or more columns) to matching build-row IDs.
/// Lookup returns row pairs or group handles for the join processor to consume.
/// See [`directory::JoinHashIndex`] for the storage design and a small example.
#[derive(Debug)]
pub(crate) struct JoinIndexMap {
/// Index implementation specialized on row-id width.
index: IndexWidth,
random_state: RandomState,
/// See [`NullEquality`] for semantics.
///
/// For implementation:
/// - `NullEqualsNothing`: skip NULL-key rows during build and probe.
/// - `NullEqualsNull`: hash and compare NULL keys
null_equality: NullEquality,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new index has no unit tests, so only SQL exercises it. SQL can't reach the u64 row-ID width, which needs more than u32::MAX build rows. Could we add tests that build each directory directly (dense, integer, general, and JoinHashIndex<u64> on a small input) from random keys with duplicates and NULLs? They could run under both NullEquality values and compare lookup_batch plus group expansion against a brute-force map. #27530 had tests of this shape for the grouped JoinHashMap that could be adapted (join_hash_map.rs).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Added some UTs covering combinations for

  • join Null semantics
  • row width specialization u32/u64
  • directory dense/integer/general
  • duplicated matches/unique matches

In 5eb078b

I think this u64 row-width is also good to get covered in SQL test, maybe by exposing a test-only config to force this path. This could be done in follow-ups.

@rusanoph

Copy link
Copy Markdown

Quick update: I've started running the comparative benchmarks on SNAP and JOB against this PR and main, including the query shapes where my CSR adapter regressed.

I'm also planning to validate the proposed dense-directory counting-sort patch on x86-64 (AMD Ryzen 5 7500F).

If possible, I'd appreciate keeping this PR open until I can share the initial results, as they may help assess the remaining performance trade-offs before merging.

@rusanoph

rusanoph commented Nov 25, 2026 •

Copy link
Copy Markdown

I'd be interested in contributing comparative benchmark results for this redesign and discussing potential follow-up optimizations.

@rusanoph Thanks, that would help. This PR differs from your CSR adapter in what the build moves and when. It keeps one directory entry per distinct key and stores a key with one row inline in that entry. Only the row IDs of repeated keys move into contiguous groups, and that happens in the same pass that builds the directory. There is no second organization pass and no admission gate. The hj queries closest to your low-probe cases are Q4 and Q6 to Q14 (even). They build about 60M lineitem rows, because the benchmark turns off join reordering, and probe 100K rows, of which 10% match. The PR description shows them unchanged to 1.09x faster. The build still costs more than on main: in my profiles of Q4 and Q5 it takes about 2.8x the CPU of main's build, and the queries come out faster only because the probe gain is larger. Results from your SNAP and JOB workloads on this branch against main would be the most useful, including the query shapes where your adapter lost time.

@mbutrovich Thanks for the suggestions! I've completed the SNAP and JOB comparison, as well as the x86-64 validation of your counting-sort patch and the controlled memory experiments.

Setup: AMD Ryzen 5 7500F, WSL2, Rust 1.97.0, one logical CPU, one execution partition.

Presets:

  • A: main merge-base 6a06058
  • B: PR head 2f6c665
  • C: B + your exact counting-sort patch

SNAP and JOB (A vs B)

Workload Queries Sum of query medians (A → B) Reduction Geomean A/B
SNAP 35 26.266 → 6.814 s 74.1% 2.714×
SNAP holdout 18 2.626 → 1.623 s 38.2% 1.644×
JOB 100 208.113 → 153.416 s 26.3% 0.996×

All 1,918 observations succeeded with matching outputs and physical plan text.

The JOB improvement is concentrated in the six family-17 queries, which account for approximately 99% of the net time saved. JOB 7b regressed from 277.5 to 360.4 ms. Selective Slashdot and Amazon out-star workloads also showed smaller slowdowns.

The counting-sort experiment confirms the direction of your M5 Max results on x86-64. I also reproduced the resource regression for sparse integer keys under a 64 MiB memory-pool limit.

Results and reproducibility:

The package includes the benchmark worker, SQL workloads, raw observations, query plans, correctness evidence, source revisions and reproduction scripts. The published statistics can be recomputed using python3 scripts/verify_evidence.py without compiling DataFusion or downloading datasets.

@2010YOUY01

Copy link
Copy Markdown
Member Author

run benchmark tpch10 tpcds imdb hj

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7186998778-5754-8zmf6 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark tpch10

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7186998778-5755-rnb6q 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark tpcds

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7186998778-5756-fkmjg 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark imdb

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7186998778-5757-bxfhr 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark hj

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark hj
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and redesign-join-ht
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Query                                                                         ┃      HEAD ┃ redesign-join-ht ┃         Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                                         │   1.93 ms │          1.90 ms │      no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                                     │   4.37 ms │          3.60 ms │  +1.22x faster │
│ QQuery 3_density=1_prob_hit=1_100K*60M                                        │  83.87 ms │         78.01 ms │  +1.08x faster │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                                      │ 188.89 ms │        134.89 ms │  +1.40x faster │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                                     │ 694.25 ms │        150.38 ms │  +4.62x faster │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                                   │ 258.79 ms │        196.13 ms │  +1.32x faster │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                                      │ 717.04 ms │        144.18 ms │  +4.97x faster │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                                    │ 250.20 ms │        195.50 ms │  +1.28x faster │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                                      │ 695.52 ms │        152.08 ms │  +4.57x faster │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                                   │ 259.19 ms │        196.53 ms │  +1.32x faster │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                                     │ 726.44 ms │        154.96 ms │  +4.69x faster │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                                   │ 248.12 ms │        201.65 ms │  +1.23x faster │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                                    │ 743.59 ms │        173.54 ms │  +4.28x faster │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                                  │ 301.26 ms │        241.22 ms │  +1.25x faster │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M                        │ 237.58 ms │        161.71 ms │  +1.47x faster │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                              │   2.40 ms │          2.40 ms │      no change │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                             │  85.87 ms │         86.41 ms │      no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                           │  93.21 ms │         92.29 ms │      no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                              │   1.95 ms │          1.95 ms │      no change │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                             │  76.69 ms │         77.01 ms │      no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                           │ 102.90 ms │        101.50 ms │      no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi             │  87.77 ms │         89.14 ms │      no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count           │ 157.33 ms │         35.22 ms │  +4.47x faster │
│ QQuery 24_density=1_prob_hit=1_3K_(single_hot_bucket)*20K_long_keys_count     │ 513.91 ms │         48.85 ms │ +10.52x faster │
│ QQuery 25_density=1_prob_hit=1_20K_(fanout~78_multi_key)*240K_multi_key_count │ 211.74 ms │         35.33 ms │  +5.99x faster │
│ QQuery 26_density=1_prob_hit=0.027_270K_dense_keys*15M                        │  53.20 ms │         53.03 ms │      no change │
│ QQuery 27_density=0.027_prob_hit=0.027_270K_sparse_keys*15M                   │  61.09 ms │         56.62 ms │  +1.08x faster │
│ QQuery 28_density=0.01_prob_hit=0.2_6M_(1.5M_one_key)*100K_count              │ 922.39 ms │        129.49 ms │  +7.12x faster │
└───────────────────────────────────────────────────────────────────────────────┴───────────┴──────────────────┴────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary               ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 7781.51ms │
│ Total Time (redesign-join-ht)   │ 2995.52ms │
│ Average Time (HEAD)             │  277.91ms │
│ Average Time (redesign-join-ht) │  106.98ms │
│ Queries Faster                  │        19 │
│ Queries Slower                  │         0 │
│ Queries with No Change          │         9 │
│ Queries with Failure            │         0 │
└─────────────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and redesign-join-ht
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Query                                                                         ┃                               HEAD ┃                   redesign-join-ht ┃         Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                                         │        1.93 / 2.21 ±0.47 / 3.15 ms │        1.90 / 2.15 ±0.39 / 2.92 ms │      no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                                     │        4.37 / 4.57 ±0.14 / 4.70 ms │        3.60 / 3.78 ±0.15 / 3.95 ms │  +1.21x faster │
│ QQuery 3_density=1_prob_hit=1_100K*60M                                        │     83.87 / 85.56 ±1.13 / 86.53 ms │     78.01 / 79.22 ±0.99 / 80.56 ms │  +1.08x faster │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                                      │  188.89 / 198.52 ±9.39 / 214.84 ms │  134.89 / 140.48 ±8.07 / 156.46 ms │  +1.41x faster │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                                     │ 694.25 / 707.09 ±11.60 / 727.52 ms │  150.38 / 152.39 ±1.04 / 153.20 ms │  +4.64x faster │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                                   │ 258.79 / 274.46 ±15.43 / 297.37 ms │  196.13 / 207.74 ±8.96 / 222.70 ms │  +1.32x faster │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                                      │  717.04 / 723.31 ±5.83 / 733.28 ms │  144.18 / 152.02 ±8.57 / 168.57 ms │  +4.76x faster │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                                    │ 250.20 / 265.02 ±12.09 / 281.15 ms │  195.50 / 201.47 ±8.55 / 218.00 ms │  +1.32x faster │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                                      │ 695.52 / 722.03 ±15.25 / 742.37 ms │ 152.08 / 165.03 ±12.57 / 183.99 ms │  +4.38x faster │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                                   │ 259.19 / 272.22 ±12.57 / 290.08 ms │ 196.53 / 211.85 ±22.31 / 256.04 ms │  +1.28x faster │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                                     │  726.44 / 728.99 ±2.49 / 732.78 ms │  154.96 / 165.12 ±7.94 / 178.53 ms │  +4.42x faster │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                                   │ 248.12 / 276.72 ±16.68 / 293.81 ms │ 201.65 / 215.79 ±23.31 / 262.03 ms │  +1.28x faster │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                                    │ 743.59 / 779.59 ±34.56 / 840.03 ms │ 173.54 / 193.45 ±21.91 / 234.15 ms │  +4.03x faster │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                                  │ 301.26 / 328.45 ±20.09 / 355.24 ms │ 241.22 / 266.62 ±23.79 / 299.52 ms │  +1.23x faster │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M                        │ 237.58 / 274.27 ±61.80 / 397.46 ms │ 161.71 / 183.57 ±22.72 / 213.30 ms │  +1.49x faster │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                              │        2.40 / 2.49 ±0.06 / 2.58 ms │        2.40 / 2.49 ±0.06 / 2.58 ms │      no change │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                             │  85.87 / 102.11 ±13.36 / 119.78 ms │   86.41 / 98.35 ±13.06 / 116.57 ms │      no change │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                           │     93.21 / 93.71 ±0.36 / 94.18 ms │     92.29 / 92.45 ±0.15 / 92.68 ms │      no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                              │        1.95 / 2.14 ±0.19 / 2.48 ms │        1.95 / 2.02 ±0.09 / 2.19 ms │  +1.06x faster │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                             │     76.69 / 77.94 ±0.75 / 78.77 ms │     77.01 / 79.22 ±2.02 / 82.72 ms │      no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                           │  102.90 / 103.37 ±0.52 / 104.36 ms │  101.50 / 102.37 ±0.61 / 103.32 ms │      no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi             │     87.77 / 88.81 ±1.10 / 90.90 ms │     89.14 / 89.87 ±0.59 / 90.68 ms │      no change │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count           │  157.33 / 157.84 ±0.41 / 158.37 ms │     35.22 / 35.38 ±0.17 / 35.65 ms │  +4.46x faster │
│ QQuery 24_density=1_prob_hit=1_3K_(single_hot_bucket)*20K_long_keys_count     │  513.91 / 517.68 ±5.43 / 528.37 ms │     48.85 / 49.04 ±0.11 / 49.16 ms │ +10.56x faster │
│ QQuery 25_density=1_prob_hit=1_20K_(fanout~78_multi_key)*240K_multi_key_count │  211.74 / 212.83 ±0.73 / 213.52 ms │     35.33 / 35.69 ±0.21 / 35.98 ms │  +5.96x faster │
│ QQuery 26_density=1_prob_hit=0.027_270K_dense_keys*15M                        │     53.20 / 53.95 ±0.63 / 55.10 ms │     53.03 / 55.00 ±1.85 / 58.08 ms │      no change │
│ QQuery 27_density=0.027_prob_hit=0.027_270K_sparse_keys*15M                   │     61.09 / 63.12 ±1.91 / 66.65 ms │     56.62 / 57.98 ±1.15 / 59.79 ms │  +1.09x faster │
│ QQuery 28_density=0.01_prob_hit=0.2_6M_(1.5M_one_key)*100K_count              │  922.39 / 937.40 ±9.75 / 948.64 ms │ 129.49 / 143.85 ±14.12 / 168.43 ms │  +6.52x faster │
└───────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────┴────────────────────────────────────┴────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary               ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 8056.42ms │
│ Total Time (redesign-join-ht)   │ 3184.41ms │
│ Average Time (HEAD)             │  287.73ms │
│ Average Time (redesign-join-ht) │  113.73ms │
│ Queries Faster                  │        20 │
│ Queries Slower                  │         0 │
│ Queries with No Change          │         8 │
│ Queries with Failure            │         0 │
└─────────────────────────────────┴───────────┘

Resource Usage

hj — base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 2.6 GiB
Avg memory 1.1 GiB
CPU user 337.1s
CPU sys 12.4s
Peak spill 0 B

hj — branch

Metric Value
Wall time 20.0s
Peak memory 2.8 GiB
Avg memory 1.2 GiB
CPU user 150.4s
CPU sys 7.7s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark tpch10
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and redesign-join-ht
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃      HEAD ┃ redesign-join-ht ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │ 331.08 ms │        327.92 ms │     no change │
│ QQuery 2  │  89.89 ms │         88.27 ms │     no change │
│ QQuery 3  │ 213.63 ms │        215.61 ms │     no change │
│ QQuery 4  │ 111.88 ms │        112.40 ms │     no change │
│ QQuery 5  │ 338.55 ms │        337.48 ms │     no change │
│ QQuery 6  │ 100.11 ms │         99.24 ms │     no change │
│ QQuery 7  │ 444.21 ms │        407.09 ms │ +1.09x faster │
│ QQuery 8  │ 356.24 ms │        352.54 ms │     no change │
│ QQuery 9  │ 505.74 ms │        505.42 ms │     no change │
│ QQuery 10 │ 283.96 ms │        282.99 ms │     no change │
│ QQuery 11 │  61.46 ms │         60.76 ms │     no change │
│ QQuery 12 │ 115.92 ms │        116.98 ms │     no change │
│ QQuery 13 │ 303.42 ms │        293.28 ms │     no change │
│ QQuery 14 │ 167.66 ms │        166.68 ms │     no change │
│ QQuery 15 │ 296.03 ms │        294.75 ms │     no change │
│ QQuery 16 │  65.06 ms │         61.48 ms │ +1.06x faster │
│ QQuery 17 │ 577.02 ms │        580.96 ms │     no change │
│ QQuery 18 │ 414.57 ms │        396.77 ms │     no change │
│ QQuery 19 │ 231.95 ms │        227.70 ms │     no change │
│ QQuery 20 │ 264.29 ms │        258.35 ms │     no change │
│ QQuery 21 │ 657.44 ms │        649.84 ms │     no change │
│ QQuery 22 │  61.14 ms │         58.65 ms │     no change │
└───────────┴───────────┴──────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary               ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 5991.24ms │
│ Total Time (redesign-join-ht)   │ 5895.13ms │
│ Average Time (HEAD)             │  272.33ms │
│ Average Time (redesign-join-ht) │  267.96ms │
│ Queries Faster                  │         2 │
│ Queries Slower                  │         0 │
│ Queries with No Change          │        20 │
│ Queries with Failure            │         0 │
└─────────────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and redesign-join-ht
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                               HEAD ┃                   redesign-join-ht ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │  331.08 / 332.42 ±1.26 / 334.25 ms │  327.92 / 330.59 ±1.59 / 332.71 ms │     no change │
│ QQuery 2  │     89.89 / 90.68 ±0.66 / 91.66 ms │     88.27 / 89.45 ±0.79 / 90.38 ms │     no change │
│ QQuery 3  │  213.63 / 216.71 ±2.34 / 220.72 ms │  215.61 / 219.64 ±3.51 / 226.10 ms │     no change │
│ QQuery 4  │  111.88 / 112.95 ±0.64 / 113.80 ms │  112.40 / 114.71 ±1.66 / 116.96 ms │     no change │
│ QQuery 5  │  338.55 / 348.85 ±6.39 / 357.56 ms │  337.48 / 340.89 ±3.45 / 346.90 ms │     no change │
│ QQuery 6  │  100.11 / 103.16 ±3.15 / 108.61 ms │   99.24 / 101.15 ±1.56 / 103.75 ms │     no change │
│ QQuery 7  │ 444.21 / 456.26 ±10.07 / 468.38 ms │  407.09 / 417.38 ±6.14 / 426.09 ms │ +1.09x faster │
│ QQuery 8  │  356.24 / 359.99 ±4.18 / 365.21 ms │  352.54 / 358.58 ±5.53 / 366.87 ms │     no change │
│ QQuery 9  │ 505.74 / 526.26 ±20.51 / 561.55 ms │  505.42 / 518.93 ±9.43 / 533.76 ms │     no change │
│ QQuery 10 │ 283.96 / 294.95 ±10.16 / 313.82 ms │  282.99 / 287.55 ±3.96 / 294.95 ms │     no change │
│ QQuery 11 │     61.46 / 62.61 ±1.44 / 65.44 ms │     60.76 / 67.41 ±7.49 / 81.06 ms │  1.08x slower │
│ QQuery 12 │  115.92 / 123.13 ±9.88 / 142.74 ms │  116.98 / 118.56 ±1.78 / 122.05 ms │     no change │
│ QQuery 13 │ 303.42 / 314.14 ±10.27 / 326.85 ms │  293.28 / 298.89 ±4.83 / 307.60 ms │     no change │
│ QQuery 14 │  167.66 / 173.08 ±4.93 / 179.75 ms │  166.68 / 171.12 ±6.08 / 183.16 ms │     no change │
│ QQuery 15 │  296.03 / 299.48 ±2.70 / 303.28 ms │  294.75 / 300.14 ±3.35 / 304.35 ms │     no change │
│ QQuery 16 │     65.06 / 67.64 ±4.09 / 75.75 ms │     61.48 / 63.51 ±1.37 / 65.38 ms │ +1.06x faster │
│ QQuery 17 │  577.02 / 588.34 ±7.47 / 598.03 ms │  580.96 / 587.72 ±4.04 / 592.98 ms │     no change │
│ QQuery 18 │  414.57 / 419.13 ±5.07 / 428.34 ms │ 396.77 / 412.21 ±15.02 / 440.74 ms │     no change │
│ QQuery 19 │  231.95 / 238.03 ±6.06 / 246.24 ms │ 227.70 / 240.37 ±21.37 / 283.03 ms │     no change │
│ QQuery 20 │  264.29 / 272.73 ±6.43 / 279.97 ms │ 258.35 / 276.44 ±14.17 / 294.13 ms │     no change │
│ QQuery 21 │  657.44 / 666.74 ±5.87 / 673.61 ms │  649.84 / 654.34 ±4.45 / 662.79 ms │     no change │
│ QQuery 22 │     61.14 / 63.35 ±1.81 / 65.98 ms │     58.65 / 63.34 ±3.00 / 67.83 ms │     no change │
└───────────┴────────────────────────────────────┴────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary               ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 6130.63ms │
│ Total Time (redesign-join-ht)   │ 6032.92ms │
│ Average Time (HEAD)             │  278.67ms │
│ Average Time (redesign-join-ht) │  274.22ms │
│ Queries Faster                  │         2 │
│ Queries Slower                  │         1 │
│ Queries with No Change          │        19 │
│ Queries with Failure            │         0 │
└─────────────────────────────────┴───────────┘

Resource Usage

tpch10 — base (merge-base)

Metric Value
Wall time 35.0s
Peak memory 4.3 GiB
Avg memory 1.3 GiB
CPU user 311.4s
CPU sys 16.8s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 35.0s
Peak memory 4.9 GiB
Avg memory 1.4 GiB
CPU user 305.9s
CPU sys 17.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark tpcds
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and redesign-join-ht
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ redesign-join-ht ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │    5.52 ms │          5.69 ms │     no change │
│ QQuery 2  │   78.77 ms │         77.75 ms │     no change │
│ QQuery 3  │   29.03 ms │         28.79 ms │     no change │
│ QQuery 4  │  453.47 ms │        456.37 ms │     no change │
│ QQuery 5  │   50.14 ms │         49.79 ms │     no change │
│ QQuery 6  │   35.29 ms │         34.50 ms │     no change │
│ QQuery 7  │   71.52 ms │         71.58 ms │     no change │
│ QQuery 8  │   37.79 ms │         38.32 ms │     no change │
│ QQuery 9  │   52.79 ms │         51.76 ms │     no change │
│ QQuery 10 │   60.33 ms │         61.01 ms │     no change │
│ QQuery 11 │  287.29 ms │        287.01 ms │     no change │
│ QQuery 12 │   28.81 ms │         27.93 ms │     no change │
│ QQuery 13 │  112.84 ms │        112.63 ms │     no change │
│ QQuery 14 │  378.12 ms │        373.99 ms │     no change │
│ QQuery 15 │   55.27 ms │         53.98 ms │     no change │
│ QQuery 16 │    6.14 ms │          6.19 ms │     no change │
│ QQuery 17 │   74.94 ms │         75.63 ms │     no change │
│ QQuery 18 │   94.37 ms │         92.22 ms │     no change │
│ QQuery 19 │   40.89 ms │         41.33 ms │     no change │
│ QQuery 20 │   35.53 ms │         34.54 ms │     no change │
│ QQuery 21 │   16.95 ms │         17.22 ms │     no change │
│ QQuery 22 │   65.28 ms │         64.44 ms │     no change │
│ QQuery 23 │  297.06 ms │        296.27 ms │     no change │
│ QQuery 24 │  197.66 ms │        196.65 ms │     no change │
│ QQuery 25 │  104.03 ms │        104.75 ms │     no change │
│ QQuery 26 │   45.78 ms │         45.50 ms │     no change │
│ QQuery 27 │    5.00 ms │          5.04 ms │     no change │
│ QQuery 28 │   57.14 ms │         60.97 ms │  1.07x slower │
│ QQuery 29 │   90.97 ms │         91.78 ms │     no change │
│ QQuery 30 │   33.03 ms │         33.23 ms │     no change │
│ QQuery 31 │  108.05 ms │        107.46 ms │     no change │
│ QQuery 32 │   20.44 ms │         20.68 ms │     no change │
│ QQuery 33 │   36.83 ms │         37.02 ms │     no change │
│ QQuery 34 │    5.48 ms │          5.63 ms │     no change │
│ QQuery 35 │   72.80 ms │         72.30 ms │     no change │
│ QQuery 36 │    5.70 ms │          5.53 ms │     no change │
│ QQuery 37 │    6.94 ms │          7.06 ms │     no change │
│ QQuery 38 │   61.51 ms │         60.33 ms │     no change │
│ QQuery 39 │   73.19 ms │         72.22 ms │     no change │
│ QQuery 40 │   23.54 ms │         24.15 ms │     no change │
│ QQuery 41 │   12.88 ms │         13.10 ms │     no change │
│ QQuery 42 │   24.01 ms │         23.53 ms │     no change │
│ QQuery 43 │    4.51 ms │          4.60 ms │     no change │
│ QQuery 44 │    5.51 ms │          5.65 ms │     no change │
│ QQuery 45 │   37.25 ms │         37.92 ms │     no change │
│ QQuery 46 │   12.19 ms │         12.35 ms │     no change │
│ QQuery 47 │  229.24 ms │        223.16 ms │     no change │
│ QQuery 48 │   92.07 ms │         91.07 ms │     no change │
│ QQuery 49 │   70.99 ms │         70.25 ms │     no change │
│ QQuery 50 │   56.86 ms │         56.99 ms │     no change │
│ QQuery 51 │   94.34 ms │         92.67 ms │     no change │
│ QQuery 52 │   24.22 ms │         23.87 ms │     no change │
│ QQuery 53 │   29.48 ms │         29.92 ms │     no change │
│ QQuery 54 │   53.47 ms │         54.90 ms │     no change │
│ QQuery 55 │   23.88 ms │         24.02 ms │     no change │
│ QQuery 56 │   38.16 ms │         38.39 ms │     no change │
│ QQuery 57 │  167.40 ms │        164.90 ms │     no change │
│ QQuery 58 │  105.85 ms │        102.42 ms │     no change │
│ QQuery 59 │  115.15 ms │        114.17 ms │     no change │
│ QQuery 60 │   38.19 ms │         38.63 ms │     no change │
│ QQuery 61 │    8.79 ms │          9.22 ms │     no change │
│ QQuery 62 │   42.82 ms │         42.80 ms │     no change │
│ QQuery 63 │   29.45 ms │         30.11 ms │     no change │
│ QQuery 64 │  255.29 ms │        257.22 ms │     no change │
│ QQuery 65 │   68.36 ms │         68.35 ms │     no change │
│ QQuery 66 │   73.75 ms │         73.65 ms │     no change │
│ QQuery 67 │  230.99 ms │        230.05 ms │     no change │
│ QQuery 68 │    6.66 ms │          6.68 ms │     no change │
│ QQuery 69 │   56.40 ms │         56.55 ms │     no change │
│ QQuery 70 │   78.73 ms │         77.84 ms │     no change │
│ QQuery 71 │   34.91 ms │         34.91 ms │     no change │
│ QQuery 72 │ 1507.19 ms │        845.52 ms │ +1.78x faster │
│ QQuery 73 │    5.13 ms │          5.30 ms │     no change │
│ QQuery 74 │  199.38 ms │        194.79 ms │     no change │
│ QQuery 75 │  138.14 ms │        139.90 ms │     no change │
│ QQuery 76 │   34.18 ms │         34.75 ms │     no change │
│ QQuery 77 │   60.36 ms │         60.40 ms │     no change │
│ QQuery 78 │  276.70 ms │        271.74 ms │     no change │
│ QQuery 79 │   67.00 ms │         67.20 ms │     no change │
│ QQuery 80 │   93.67 ms │         93.78 ms │     no change │
│ QQuery 81 │   25.98 ms │         26.39 ms │     no change │
│ QQuery 82 │   16.54 ms │         16.75 ms │     no change │
│ QQuery 83 │   32.95 ms │         32.71 ms │     no change │
│ QQuery 84 │   29.57 ms │         30.23 ms │     no change │
│ QQuery 85 │   96.89 ms │         96.10 ms │     no change │
│ QQuery 86 │   25.13 ms │         24.91 ms │     no change │
│ QQuery 87 │   61.65 ms │         61.01 ms │     no change │
│ QQuery 88 │   58.93 ms │         59.45 ms │     no change │
│ QQuery 89 │   34.97 ms │         35.60 ms │     no change │
│ QQuery 90 │   16.50 ms │         16.53 ms │     no change │
│ QQuery 91 │   40.81 ms │         40.71 ms │     no change │
│ QQuery 92 │   29.33 ms │         29.98 ms │     no change │
│ QQuery 93 │   50.65 ms │         49.13 ms │     no change │
│ QQuery 94 │   37.94 ms │         37.97 ms │     no change │
│ QQuery 95 │   77.98 ms │         78.25 ms │     no change │
│ QQuery 96 │   23.81 ms │         23.97 ms │     no change │
│ QQuery 97 │   50.74 ms │         50.93 ms │     no change │
│ QQuery 98 │   42.66 ms │         42.26 ms │     no change │
│ QQuery 99 │   63.83 ms │         62.97 ms │     no change │
└───────────┴────────────┴──────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary               ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 8636.63ms │
│ Total Time (redesign-join-ht)   │ 7948.39ms │
│ Average Time (HEAD)             │   87.24ms │
│ Average Time (redesign-join-ht) │   80.29ms │
│ Queries Faster                  │         1 │
│ Queries Slower                  │         1 │
│ Queries with No Change          │        97 │
│ Queries with Failure            │         0 │
└─────────────────────────────────┴───────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and redesign-join-ht
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                  redesign-join-ht ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.52 / 6.21 ±1.01 / 8.21 ms │       5.69 / 6.33 ±0.94 / 8.18 ms │     no change │
│ QQuery 2  │        78.77 / 78.95 ±0.14 / 79.14 ms │    77.75 / 77.95 ±0.19 / 78.26 ms │     no change │
│ QQuery 3  │        29.03 / 29.08 ±0.04 / 29.15 ms │    28.79 / 29.01 ±0.18 / 29.30 ms │     no change │
│ QQuery 4  │     453.47 / 459.21 ±3.00 / 461.46 ms │ 456.37 / 457.83 ±1.32 / 460.22 ms │     no change │
│ QQuery 5  │        50.14 / 50.59 ±0.42 / 51.09 ms │    49.79 / 52.11 ±2.33 / 56.03 ms │     no change │
│ QQuery 6  │        35.29 / 35.69 ±0.30 / 36.17 ms │    34.50 / 35.15 ±0.43 / 35.65 ms │     no change │
│ QQuery 7  │        71.52 / 72.19 ±0.53 / 73.03 ms │    71.58 / 72.32 ±0.75 / 73.76 ms │     no change │
│ QQuery 8  │        37.79 / 37.92 ±0.15 / 38.21 ms │    38.32 / 38.50 ±0.15 / 38.78 ms │     no change │
│ QQuery 9  │        52.79 / 56.05 ±3.87 / 63.62 ms │    51.76 / 54.76 ±3.44 / 61.36 ms │     no change │
│ QQuery 10 │        60.33 / 60.64 ±0.24 / 60.92 ms │    61.01 / 61.60 ±0.32 / 61.99 ms │     no change │
│ QQuery 11 │     287.29 / 291.85 ±3.00 / 295.44 ms │ 287.01 / 295.00 ±6.47 / 306.35 ms │     no change │
│ QQuery 12 │        28.81 / 29.69 ±1.35 / 32.38 ms │    27.93 / 30.09 ±3.44 / 36.95 ms │     no change │
│ QQuery 13 │     112.84 / 113.67 ±0.74 / 115.00 ms │ 112.63 / 114.25 ±1.27 / 116.32 ms │     no change │
│ QQuery 14 │     378.12 / 382.05 ±4.09 / 388.49 ms │ 373.99 / 380.47 ±5.76 / 390.27 ms │     no change │
│ QQuery 15 │        55.27 / 56.17 ±0.92 / 57.93 ms │    53.98 / 54.90 ±0.84 / 56.37 ms │     no change │
│ QQuery 16 │           6.14 / 6.33 ±0.16 / 6.55 ms │       6.19 / 6.34 ±0.14 / 6.55 ms │     no change │
│ QQuery 17 │        74.94 / 76.32 ±1.23 / 78.63 ms │    75.63 / 76.96 ±1.69 / 80.15 ms │     no change │
│ QQuery 18 │        94.37 / 96.22 ±1.90 / 99.88 ms │    92.22 / 94.52 ±1.51 / 96.93 ms │     no change │
│ QQuery 19 │        40.89 / 41.19 ±0.17 / 41.35 ms │    41.33 / 41.68 ±0.25 / 42.01 ms │     no change │
│ QQuery 20 │        35.53 / 35.86 ±0.29 / 36.30 ms │    34.54 / 36.70 ±2.87 / 42.38 ms │     no change │
│ QQuery 21 │        16.95 / 17.11 ±0.18 / 17.40 ms │    17.22 / 17.33 ±0.18 / 17.68 ms │     no change │
│ QQuery 22 │        65.28 / 65.84 ±0.45 / 66.43 ms │    64.44 / 66.15 ±1.02 / 67.29 ms │     no change │
│ QQuery 23 │     297.06 / 299.27 ±1.93 / 302.04 ms │ 296.27 / 299.36 ±3.03 / 304.53 ms │     no change │
│ QQuery 24 │     197.66 / 203.66 ±8.58 / 220.33 ms │ 196.65 / 201.08 ±3.69 / 206.20 ms │     no change │
│ QQuery 25 │     104.03 / 106.02 ±1.77 / 108.57 ms │ 104.75 / 107.94 ±3.04 / 113.26 ms │     no change │
│ QQuery 26 │        45.78 / 46.38 ±0.42 / 46.92 ms │    45.50 / 45.81 ±0.25 / 46.16 ms │     no change │
│ QQuery 27 │           5.00 / 5.25 ±0.19 / 5.58 ms │       5.04 / 5.20 ±0.18 / 5.53 ms │     no change │
│ QQuery 28 │        57.14 / 58.95 ±1.80 / 61.55 ms │    60.97 / 61.70 ±0.42 / 62.13 ms │     no change │
│ QQuery 29 │        90.97 / 91.91 ±0.81 / 93.00 ms │    91.78 / 94.90 ±2.26 / 98.70 ms │     no change │
│ QQuery 30 │        33.03 / 33.72 ±0.44 / 34.27 ms │    33.23 / 33.49 ±0.17 / 33.70 ms │     no change │
│ QQuery 31 │     108.05 / 108.83 ±0.75 / 110.11 ms │ 107.46 / 108.61 ±0.77 / 109.62 ms │     no change │
│ QQuery 32 │        20.44 / 20.61 ±0.11 / 20.76 ms │    20.68 / 20.91 ±0.21 / 21.28 ms │     no change │
│ QQuery 33 │        36.83 / 39.35 ±3.73 / 46.53 ms │    37.02 / 38.73 ±3.07 / 44.88 ms │     no change │
│ QQuery 34 │           5.48 / 5.66 ±0.23 / 6.10 ms │       5.63 / 5.83 ±0.15 / 6.00 ms │     no change │
│ QQuery 35 │        72.80 / 73.35 ±0.42 / 73.98 ms │    72.30 / 72.86 ±0.33 / 73.18 ms │     no change │
│ QQuery 36 │           5.70 / 5.91 ±0.19 / 6.18 ms │       5.53 / 5.72 ±0.22 / 6.14 ms │     no change │
│ QQuery 37 │           6.94 / 7.15 ±0.20 / 7.52 ms │       7.06 / 7.22 ±0.14 / 7.46 ms │     no change │
│ QQuery 38 │        61.51 / 62.02 ±0.36 / 62.37 ms │    60.33 / 61.54 ±0.67 / 62.31 ms │     no change │
│ QQuery 39 │        73.19 / 76.17 ±3.82 / 83.70 ms │    72.22 / 74.89 ±3.36 / 81.24 ms │     no change │
│ QQuery 40 │        23.54 / 24.19 ±0.44 / 24.80 ms │    24.15 / 24.45 ±0.25 / 24.73 ms │     no change │
│ QQuery 41 │        12.88 / 13.07 ±0.16 / 13.36 ms │    13.10 / 13.27 ±0.14 / 13.47 ms │     no change │
│ QQuery 42 │        24.01 / 24.29 ±0.18 / 24.58 ms │    23.53 / 23.90 ±0.38 / 24.61 ms │     no change │
│ QQuery 43 │           4.51 / 4.68 ±0.22 / 5.12 ms │       4.60 / 4.73 ±0.17 / 5.07 ms │     no change │
│ QQuery 44 │           5.51 / 5.62 ±0.11 / 5.82 ms │       5.65 / 6.40 ±1.27 / 8.94 ms │  1.14x slower │
│ QQuery 45 │        37.25 / 38.53 ±0.72 / 39.48 ms │    37.92 / 38.58 ±0.52 / 39.22 ms │     no change │
│ QQuery 46 │        12.19 / 12.42 ±0.26 / 12.89 ms │    12.35 / 12.77 ±0.61 / 13.99 ms │     no change │
│ QQuery 47 │     229.24 / 231.59 ±3.00 / 237.05 ms │ 223.16 / 227.64 ±3.75 / 234.57 ms │     no change │
│ QQuery 48 │        92.07 / 94.12 ±2.89 / 99.75 ms │    91.07 / 93.25 ±3.38 / 99.95 ms │     no change │
│ QQuery 49 │        70.99 / 71.81 ±0.69 / 72.79 ms │    70.25 / 71.97 ±1.50 / 74.37 ms │     no change │
│ QQuery 50 │        56.86 / 59.40 ±4.51 / 68.40 ms │    56.99 / 59.39 ±4.32 / 68.02 ms │     no change │
│ QQuery 51 │       94.34 / 96.66 ±2.94 / 102.23 ms │    92.67 / 95.20 ±1.70 / 97.88 ms │     no change │
│ QQuery 52 │        24.22 / 24.38 ±0.16 / 24.64 ms │    23.87 / 24.16 ±0.35 / 24.85 ms │     no change │
│ QQuery 53 │        29.48 / 29.65 ±0.16 / 29.93 ms │    29.92 / 30.21 ±0.16 / 30.38 ms │     no change │
│ QQuery 54 │        53.47 / 55.94 ±3.27 / 62.26 ms │    54.90 / 55.23 ±0.22 / 55.45 ms │     no change │
│ QQuery 55 │        23.88 / 24.68 ±0.66 / 25.84 ms │    24.02 / 24.42 ±0.35 / 24.96 ms │     no change │
│ QQuery 56 │        38.16 / 38.55 ±0.25 / 38.78 ms │    38.39 / 38.57 ±0.14 / 38.76 ms │     no change │
│ QQuery 57 │     167.40 / 170.02 ±2.55 / 174.75 ms │ 164.90 / 166.80 ±1.48 / 169.43 ms │     no change │
│ QQuery 58 │     105.85 / 107.61 ±1.50 / 110.18 ms │ 102.42 / 104.09 ±1.51 / 106.47 ms │     no change │
│ QQuery 59 │     115.15 / 117.25 ±3.33 / 123.89 ms │ 114.17 / 115.07 ±0.74 / 116.38 ms │     no change │
│ QQuery 60 │        38.19 / 38.43 ±0.28 / 38.96 ms │    38.63 / 38.91 ±0.30 / 39.48 ms │     no change │
│ QQuery 61 │           8.79 / 8.99 ±0.18 / 9.32 ms │     9.22 / 10.12 ±1.44 / 12.98 ms │  1.13x slower │
│ QQuery 62 │        42.82 / 43.31 ±0.45 / 44.12 ms │    42.80 / 43.12 ±0.23 / 43.49 ms │     no change │
│ QQuery 63 │        29.45 / 29.65 ±0.12 / 29.80 ms │    30.11 / 30.39 ±0.28 / 30.77 ms │     no change │
│ QQuery 64 │     255.29 / 261.03 ±6.87 / 273.67 ms │ 257.22 / 260.29 ±4.15 / 268.47 ms │     no change │
│ QQuery 65 │        68.36 / 69.23 ±1.16 / 71.50 ms │    68.35 / 68.93 ±0.51 / 69.61 ms │     no change │
│ QQuery 66 │        73.75 / 74.48 ±0.45 / 75.11 ms │    73.65 / 74.75 ±0.88 / 76.33 ms │     no change │
│ QQuery 67 │     230.99 / 237.20 ±5.48 / 246.74 ms │ 230.05 / 234.78 ±4.70 / 242.36 ms │     no change │
│ QQuery 68 │           6.66 / 6.81 ±0.23 / 7.27 ms │       6.68 / 6.79 ±0.09 / 6.93 ms │     no change │
│ QQuery 69 │        56.40 / 56.67 ±0.16 / 56.83 ms │    56.55 / 56.75 ±0.24 / 57.19 ms │     no change │
│ QQuery 70 │        78.73 / 80.22 ±2.60 / 85.40 ms │    77.84 / 78.47 ±1.02 / 80.49 ms │     no change │
│ QQuery 71 │        34.91 / 37.58 ±4.54 / 46.63 ms │    34.91 / 37.49 ±4.35 / 46.17 ms │     no change │
│ QQuery 72 │ 1507.19 / 1619.69 ±79.97 / 1734.89 ms │ 845.52 / 854.90 ±6.51 / 863.71 ms │ +1.89x faster │
│ QQuery 73 │           5.13 / 5.28 ±0.18 / 5.62 ms │       5.30 / 5.40 ±0.19 / 5.79 ms │     no change │
│ QQuery 74 │     199.38 / 203.40 ±3.70 / 210.38 ms │ 194.79 / 197.86 ±2.73 / 202.19 ms │     no change │
│ QQuery 75 │     138.14 / 138.33 ±0.17 / 138.62 ms │ 139.90 / 141.83 ±1.71 / 144.28 ms │     no change │
│ QQuery 76 │        34.18 / 34.58 ±0.30 / 35.07 ms │    34.75 / 34.89 ±0.13 / 35.14 ms │     no change │
│ QQuery 77 │        60.36 / 61.32 ±0.72 / 62.32 ms │    60.40 / 60.53 ±0.10 / 60.66 ms │     no change │
│ QQuery 78 │    276.70 / 282.65 ±10.14 / 302.83 ms │ 271.74 / 282.89 ±9.40 / 297.59 ms │     no change │
│ QQuery 79 │        67.00 / 70.00 ±4.06 / 77.63 ms │    67.20 / 69.06 ±2.11 / 73.08 ms │     no change │
│ QQuery 80 │        93.67 / 94.83 ±1.54 / 97.81 ms │    93.78 / 95.57 ±1.88 / 98.93 ms │     no change │
│ QQuery 81 │        25.98 / 26.24 ±0.23 / 26.65 ms │    26.39 / 26.62 ±0.15 / 26.84 ms │     no change │
│ QQuery 82 │        16.54 / 16.63 ±0.11 / 16.82 ms │    16.75 / 16.96 ±0.13 / 17.13 ms │     no change │
│ QQuery 83 │        32.95 / 33.26 ±0.17 / 33.44 ms │    32.71 / 34.71 ±3.36 / 41.43 ms │     no change │
│ QQuery 84 │        29.57 / 31.73 ±3.67 / 39.04 ms │    30.23 / 30.73 ±0.42 / 31.37 ms │     no change │
│ QQuery 85 │        96.89 / 98.10 ±0.82 / 99.30 ms │   96.10 / 98.16 ±3.32 / 104.78 ms │     no change │
│ QQuery 86 │        25.13 / 25.92 ±0.79 / 27.38 ms │    24.91 / 25.52 ±0.55 / 26.24 ms │     no change │
│ QQuery 87 │        61.65 / 63.53 ±3.18 / 69.87 ms │    61.01 / 62.16 ±0.59 / 62.69 ms │     no change │
│ QQuery 88 │        58.93 / 59.59 ±0.41 / 60.20 ms │    59.45 / 60.17 ±0.53 / 61.04 ms │     no change │
│ QQuery 89 │        34.97 / 35.18 ±0.14 / 35.37 ms │    35.60 / 36.74 ±1.60 / 39.91 ms │     no change │
│ QQuery 90 │        16.50 / 17.04 ±0.65 / 18.28 ms │    16.53 / 16.69 ±0.09 / 16.77 ms │     no change │
│ QQuery 91 │        40.81 / 40.98 ±0.15 / 41.17 ms │    40.71 / 40.97 ±0.22 / 41.36 ms │     no change │
│ QQuery 92 │        29.33 / 29.58 ±0.32 / 30.11 ms │    29.98 / 32.11 ±3.40 / 38.89 ms │  1.09x slower │
│ QQuery 93 │        50.65 / 51.14 ±0.80 / 52.75 ms │    49.13 / 50.42 ±1.27 / 52.72 ms │     no change │
│ QQuery 94 │        37.94 / 38.41 ±0.33 / 38.94 ms │    37.97 / 39.33 ±1.58 / 42.20 ms │     no change │
│ QQuery 95 │        77.98 / 78.54 ±0.49 / 79.36 ms │    78.25 / 79.99 ±1.07 / 81.41 ms │     no change │
│ QQuery 96 │        23.81 / 24.19 ±0.20 / 24.37 ms │    23.97 / 24.99 ±1.76 / 28.50 ms │     no change │
│ QQuery 97 │        50.74 / 53.69 ±2.58 / 58.52 ms │    50.93 / 51.94 ±0.91 / 53.54 ms │     no change │
│ QQuery 98 │        42.66 / 43.04 ±0.50 / 44.02 ms │    42.26 / 42.89 ±0.51 / 43.38 ms │     no change │
│ QQuery 99 │        63.83 / 64.46 ±0.35 / 64.85 ms │    62.97 / 63.97 ±1.48 / 66.89 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary               ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 8872.43ms │
│ Total Time (redesign-join-ht)   │ 8094.63ms │
│ Average Time (HEAD)             │   89.62ms │
│ Average Time (redesign-join-ht) │   81.76ms │
│ Queries Faster                  │         1 │
│ Queries Slower                  │         3 │
│ Queries with No Change          │        95 │
│ Queries with Failure            │         0 │
└─────────────────────────────────┴───────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 2.2 GiB
Avg memory 1.6 GiB
CPU user 185.7s
CPU sys 5.4s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 45.0s
Peak memory 2.1 GiB
Avg memory 1.4 GiB
CPU user 147.0s
CPU sys 5.6s
Peak spill 0 B

File an issue against this benchmark runner

@2010YOUY01

Copy link
Copy Markdown
Member Author

@mbutrovich Thanks for the thoughtful feedbacks! Previous suggestions has been addressed (except for #27746 (comment), I plan to do it after checking full benchmark numbers)

Next I'll run and investigate hj/tpch/tpcds/JOB benchmark results on this PR.

@2010YOUY01

Copy link
Copy Markdown
Member Author

@rusanoph Thanks for the detailed benchmarking, and TIL about the SNAP benchmark!

The original motivation for this design was to optimize regular hash joins with duplicate build-side keys. I hadn't specifically considered graph workloads, and I'm not sure how common they are among DataFusion users, but it's nice to see the design works for that.

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing redesign-join-ht (5eb078b) to 6a06058 (merge-base) diff

Run configuration
run benchmark imdb
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and redesign-join-ht
--------------------
Benchmark imdb.json
--------------------
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query      ┃       HEAD ┃ redesign-join-ht ┃        Change ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1   │   99.78 ms │         99.21 ms │     no change │
│ QQuery 2   │   89.67 ms │         89.12 ms │     no change │
│ QQuery 3   │   83.14 ms │         82.40 ms │     no change │
│ QQuery 4   │   92.85 ms │         92.69 ms │     no change │
│ QQuery 5   │   83.69 ms │         83.69 ms │     no change │
│ QQuery 6   │   81.17 ms │         80.21 ms │     no change │
│ QQuery 7   │   26.35 ms │         26.50 ms │     no change │
│ QQuery 8   │  101.31 ms │        105.48 ms │     no change │
│ QQuery 9   │  317.89 ms │        319.13 ms │     no change │
│ QQuery 10  │  298.60 ms │        297.49 ms │     no change │
│ QQuery 11  │  330.76 ms │        328.22 ms │     no change │
│ QQuery 12  │  111.97 ms │        111.48 ms │     no change │
│ QQuery 13  │   94.33 ms │         94.28 ms │     no change │
│ QQuery 14  │  116.21 ms │        115.48 ms │     no change │
│ QQuery 15  │   61.70 ms │         60.48 ms │     no change │
│ QQuery 16  │   54.72 ms │         54.28 ms │     no change │
│ QQuery 17  │  361.54 ms │        361.33 ms │     no change │
│ QQuery 18  │  373.29 ms │        300.05 ms │ +1.24x faster │
│ QQuery 19  │  376.10 ms │        312.78 ms │ +1.20x faster │
│ QQuery 20  │  363.47 ms │        295.00 ms │ +1.23x faster │
│ QQuery 21  │  408.49 ms │        329.96 ms │ +1.24x faster │
│ QQuery 22  │  388.89 ms │        310.36 ms │ +1.25x faster │
│ QQuery 23  │  592.71 ms │        469.26 ms │ +1.26x faster │
│ QQuery 24  │  221.57 ms │        237.80 ms │  1.07x slower │
│ QQuery 25  │  210.17 ms │        226.72 ms │  1.08x slower │
│ QQuery 26  │  409.49 ms │        446.18 ms │  1.09x slower │
│ QQuery 27  │  234.32 ms │        238.28 ms │     no change │
│ QQuery 28  │  241.53 ms │        241.99 ms │     no change │
│ QQuery 29  │  797.86 ms │        764.36 ms │     no change │
│ QQuery 30  │  641.83 ms │        589.42 ms │ +1.09x faster │
│ QQuery 31  │  368.97 ms │        373.62 ms │     no change │
│ QQuery 32  │  361.99 ms │        362.06 ms │     no change │
│ QQuery 33  │  362.96 ms │        357.02 ms │     no change │
│ QQuery 34  │  388.29 ms │        380.26 ms │     no change │
│ QQuery 35  │  220.78 ms │        215.19 ms │     no change │
│ QQuery 36  │  147.15 ms │        145.98 ms │     no change │
│ QQuery 37  │  231.57 ms │        223.09 ms │     no change │
│ QQuery 38  │  102.46 ms │        100.10 ms │     no change │
│ QQuery 39  │  100.24 ms │         98.52 ms │     no change │
│ QQuery 40  │   94.97 ms │         94.00 ms │     no change │
│ QQuery 41  │  162.65 ms │        151.34 ms │ +1.07x faster │
│ QQuery 42  │  218.39 ms │        213.31 ms │     no change │
│ QQuery 43  │  165.20 ms │        168.85 ms │     no change │
│ QQuery 44  │  232.01 ms │        226.10 ms │     no change │
│ QQuery 45  │  375.42 ms │        370.73 ms │     no change │
│ QQuery 46  │  214.78 ms │        218.07 ms │     no change │
│ QQuery 47  │  197.57 ms │        193.33 ms │     no change │
│ QQuery 48  │  210.92 ms │        208.46 ms │     no change │
│ QQuery 49  │  328.16 ms │        334.99 ms │     no change │
│ QQuery 50  │  342.82 ms │        346.43 ms │     no change │
│ QQuery 51  │  343.61 ms │        341.64 ms │     no change │
│ QQuery 52  │  422.55 ms │        422.27 ms │     no change │
│ QQuery 53  │  422.83 ms │        407.43 ms │     no change │
│ QQuery 54  │  447.44 ms │        445.76 ms │     no change │
│ QQuery 55  │  167.95 ms │        183.54 ms │  1.09x slower │
│ QQuery 56  │ 2662.35 ms │       1971.47 ms │ +1.35x faster │
│ QQuery 57  │ 2691.56 ms │       2062.61 ms │ +1.30x faster │
│ QQuery 58  │ 2675.12 ms │       2034.22 ms │ +1.32x faster │
│ QQuery 59  │ 2715.16 ms │       2045.15 ms │ +1.33x faster │
│ QQuery 60  │ 1584.53 ms │        965.22 ms │ +1.64x faster │
│ QQuery 61  │ 3852.06 ms │       1944.86 ms │ +1.98x faster │
│ QQuery 62  │ 3923.29 ms │       1968.89 ms │ +1.99x faster │
│ QQuery 63  │ 4224.50 ms │       2017.15 ms │ +2.09x faster │
│ QQuery 64  │ 1733.75 ms │       1008.86 ms │ +1.72x faster │
│ QQuery 65  │ 3948.89 ms │       1999.73 ms │ +1.97x faster │
│ QQuery 66  │  292.68 ms │        296.64 ms │     no change │
│ QQuery 67  │  265.74 ms │        270.54 ms │     no change │
│ QQuery 68  │  289.40 ms │        279.13 ms │     no change │
│ QQuery 69  │  565.97 ms │        601.76 ms │  1.06x slower │
│ QQuery 70  │  580.13 ms │        591.46 ms │     no change │
│ QQuery 71  │  559.34 ms │        585.72 ms │     no change │
│ QQuery 72  │  565.04 ms │        579.67 ms │     no change │
│ QQuery 73  │  265.91 ms │        272.28 ms │     no change │
│ QQuery 74  │  325.38 ms │        325.88 ms │     no change │
│ QQuery 75  │  277.47 ms │        279.45 ms │     no change │
│ QQuery 76  │  374.07 ms │        376.82 ms │     no change │
│ QQuery 77  │  357.30 ms │        351.20 ms │     no change │
│ QQuery 78  │  376.47 ms │        381.72 ms │     no change │
│ QQuery 79  │  448.85 ms │        445.41 ms │     no change │
│ QQuery 80  │  448.32 ms │        440.26 ms │     no change │
│ QQuery 81  │  476.74 ms │        463.59 ms │     no change │
│ QQuery 82  │  423.87 ms │        416.46 ms │     no change │
│ QQuery 83  │  377.36 ms │        373.26 ms │     no change │
│ QQuery 84  │  333.33 ms │        335.68 ms │     no change │
│ QQuery 85  │  383.43 ms │        374.00 ms │     no change │
│ QQuery 86  │  682.25 ms │        657.95 ms │     no change │
│ QQuery 87  │  601.23 ms │        592.92 ms │     no change │
│ QQuery 88  │  331.42 ms │        323.45 ms │     no change │
│ QQuery 89  │  319.32 ms │        316.08 ms │     no change │
│ QQuery 90  │  342.65 ms │        346.96 ms │     no change │
│ QQuery 91  │  312.09 ms │        328.23 ms │  1.05x slower │
│ QQuery 92  │  283.68 ms │        288.82 ms │     no change │
│ QQuery 93  │  312.87 ms │        310.11 ms │     no change │
│ QQuery 94  │  372.59 ms │        375.09 ms │     no change │
│ QQuery 95  │  370.00 ms │        383.27 ms │     no change │
│ QQuery 96  │  383.10 ms │        386.36 ms │     no change │
│ QQuery 97  │  420.10 ms │        428.30 ms │     no change │
│ QQuery 98  │  411.70 ms │        419.17 ms │     no change │
│ QQuery 99  │  495.99 ms │        476.57 ms │     no change │
│ QQuery 100 │  560.23 ms │        599.19 ms │  1.07x slower │
│ QQuery 101 │  534.67 ms │        547.06 ms │     no change │
│ QQuery 102 │ 1031.52 ms │        968.70 ms │ +1.06x faster │
│ QQuery 103 │  301.51 ms │        311.57 ms │     no change │
│ QQuery 104 │  333.67 ms │        332.65 ms │     no change │
│ QQuery 105 │  306.97 ms │        311.48 ms │     no change │
│ QQuery 106 │  348.81 ms │        342.78 ms │     no change │
│ QQuery 107 │  344.77 ms │        353.85 ms │     no change │
│ QQuery 108 │  343.94 ms │        357.02 ms │     no change │
│ QQuery 109 │   17.16 ms │         17.32 ms │     no change │
│ QQuery 110 │   88.51 ms │         88.42 ms │     no change │
│ QQuery 111 │  227.33 ms │        228.60 ms │     no change │
│ QQuery 112 │  206.15 ms │        206.24 ms │     no change │
│ QQuery 113 │  227.12 ms │        236.77 ms │     no change │
└────────────┴────────────┴──────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary               ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 62806.49ms │
│ Total Time (redesign-join-ht)   │ 50339.75ms │
│ Average Time (HEAD)             │   555.81ms │
│ Average Time (redesign-join-ht) │   445.48ms │
│ Queries Faster                  │         19 │
│ Queries Slower                  │          7 │
│ Queries with No Change          │         87 │
│ Queries with Failure            │          0 │
└─────────────────────────────────┴────────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and redesign-join-ht
--------------------
Benchmark imdb.json
--------------------
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query      ┃                                   HEAD ┃                       redesign-join-ht ┃        Change ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1   │       99.78 / 101.02 ±1.78 / 104.55 ms │       99.21 / 100.20 ±1.25 / 102.64 ms │     no change │
│ QQuery 2   │         89.67 / 89.92 ±0.17 / 90.18 ms │         89.12 / 89.48 ±0.35 / 90.11 ms │     no change │
│ QQuery 3   │         83.14 / 83.72 ±0.74 / 85.16 ms │         82.40 / 83.58 ±1.13 / 85.49 ms │     no change │
│ QQuery 4   │         92.85 / 93.41 ±0.47 / 93.99 ms │         92.69 / 92.91 ±0.20 / 93.16 ms │     no change │
│ QQuery 5   │         83.69 / 84.94 ±1.83 / 88.52 ms │         83.69 / 84.48 ±0.88 / 85.87 ms │     no change │
│ QQuery 6   │         81.17 / 81.63 ±0.55 / 82.65 ms │         80.21 / 80.82 ±0.38 / 81.35 ms │     no change │
│ QQuery 7   │         26.35 / 26.67 ±0.26 / 27.07 ms │         26.50 / 26.66 ±0.16 / 26.96 ms │     no change │
│ QQuery 8   │      101.31 / 102.92 ±2.14 / 107.02 ms │      105.48 / 107.70 ±1.69 / 109.93 ms │     no change │
│ QQuery 9   │      317.89 / 325.39 ±6.86 / 334.65 ms │      319.13 / 322.85 ±5.08 / 332.84 ms │     no change │
│ QQuery 10  │      298.60 / 300.54 ±2.08 / 304.40 ms │      297.49 / 298.94 ±1.66 / 302.17 ms │     no change │
│ QQuery 11  │      330.76 / 332.55 ±1.47 / 334.28 ms │      328.22 / 330.35 ±2.30 / 334.57 ms │     no change │
│ QQuery 12  │      111.97 / 113.60 ±1.77 / 116.75 ms │      111.48 / 112.43 ±1.04 / 113.75 ms │     no change │
│ QQuery 13  │        94.33 / 98.53 ±6.87 / 112.13 ms │         94.28 / 95.43 ±1.83 / 99.08 ms │     no change │
│ QQuery 14  │      116.21 / 117.42 ±1.01 / 119.08 ms │      115.48 / 118.02 ±1.87 / 120.57 ms │     no change │
│ QQuery 15  │         61.70 / 63.70 ±1.72 / 66.59 ms │         60.48 / 62.45 ±2.81 / 67.99 ms │     no change │
│ QQuery 16  │         54.72 / 55.09 ±0.38 / 55.75 ms │         54.28 / 54.69 ±0.31 / 55.12 ms │     no change │
│ QQuery 17  │      361.54 / 368.56 ±6.73 / 379.95 ms │      361.33 / 367.05 ±6.39 / 379.43 ms │     no change │
│ QQuery 18  │      373.29 / 376.74 ±3.88 / 384.08 ms │      300.05 / 303.62 ±2.65 / 307.49 ms │ +1.24x faster │
│ QQuery 19  │      376.10 / 387.91 ±6.16 / 393.78 ms │      312.78 / 320.01 ±6.08 / 327.64 ms │ +1.21x faster │
│ QQuery 20  │      363.47 / 373.66 ±6.63 / 382.43 ms │      295.00 / 298.84 ±2.61 / 301.68 ms │ +1.25x faster │
│ QQuery 21  │      408.49 / 410.94 ±3.36 / 417.53 ms │      329.96 / 335.56 ±4.93 / 343.25 ms │ +1.22x faster │
│ QQuery 22  │      388.89 / 392.93 ±3.03 / 397.34 ms │      310.36 / 316.09 ±6.44 / 328.19 ms │ +1.24x faster │
│ QQuery 23  │     592.71 / 631.23 ±34.28 / 688.83 ms │      469.26 / 480.59 ±8.15 / 490.02 ms │ +1.31x faster │
│ QQuery 24  │      221.57 / 232.25 ±8.46 / 241.57 ms │     237.80 / 249.38 ±17.58 / 283.96 ms │  1.07x slower │
│ QQuery 25  │      210.17 / 220.06 ±6.03 / 226.48 ms │      226.72 / 233.85 ±7.54 / 243.39 ms │  1.06x slower │
│ QQuery 26  │     409.49 / 436.67 ±28.27 / 484.28 ms │     446.18 / 466.81 ±23.51 / 504.53 ms │  1.07x slower │
│ QQuery 27  │      234.32 / 242.01 ±6.40 / 251.49 ms │     238.28 / 250.85 ±14.15 / 275.52 ms │     no change │
│ QQuery 28  │      241.53 / 245.75 ±3.56 / 251.98 ms │      241.99 / 247.09 ±8.36 / 263.74 ms │     no change │
│ QQuery 29  │     797.86 / 853.08 ±34.65 / 890.53 ms │     764.36 / 812.79 ±47.25 / 890.19 ms │     no change │
│ QQuery 30  │     641.83 / 671.42 ±20.47 / 692.94 ms │     589.42 / 646.03 ±43.46 / 712.86 ms │     no change │
│ QQuery 31  │     368.97 / 400.12 ±26.56 / 446.95 ms │     373.62 / 399.42 ±25.79 / 444.90 ms │     no change │
│ QQuery 32  │      361.99 / 374.26 ±6.89 / 381.49 ms │     362.06 / 374.57 ±10.85 / 390.72 ms │     no change │
│ QQuery 33  │     362.96 / 376.50 ±11.01 / 396.41 ms │     357.02 / 377.88 ±19.52 / 414.06 ms │     no change │
│ QQuery 34  │     388.29 / 400.73 ±12.85 / 424.07 ms │     380.26 / 397.06 ±14.73 / 420.51 ms │     no change │
│ QQuery 35  │     220.78 / 233.80 ±10.47 / 249.58 ms │      215.19 / 230.10 ±9.44 / 243.82 ms │     no change │
│ QQuery 36  │      147.15 / 157.33 ±7.37 / 168.33 ms │      145.98 / 151.20 ±4.57 / 157.39 ms │     no change │
│ QQuery 37  │     231.57 / 246.40 ±12.03 / 266.21 ms │      223.09 / 233.57 ±5.56 / 238.30 ms │ +1.05x faster │
│ QQuery 38  │      102.46 / 108.03 ±5.79 / 117.96 ms │      100.10 / 104.51 ±3.63 / 109.24 ms │     no change │
│ QQuery 39  │      100.24 / 103.36 ±4.27 / 111.72 ms │       98.52 / 104.27 ±3.99 / 108.52 ms │     no change │
│ QQuery 40  │        94.97 / 98.33 ±3.28 / 104.11 ms │        94.00 / 96.60 ±2.14 / 100.20 ms │     no change │
│ QQuery 41  │      162.65 / 166.57 ±2.09 / 168.39 ms │      151.34 / 158.15 ±4.32 / 163.82 ms │ +1.05x faster │
│ QQuery 42  │      218.39 / 221.79 ±2.64 / 225.66 ms │      213.31 / 218.11 ±4.40 / 226.20 ms │     no change │
│ QQuery 43  │      165.20 / 170.74 ±4.88 / 179.19 ms │      168.85 / 175.96 ±6.46 / 186.40 ms │     no change │
│ QQuery 44  │      232.01 / 236.33 ±3.81 / 240.89 ms │      226.10 / 233.84 ±4.26 / 238.00 ms │     no change │
│ QQuery 45  │      375.42 / 388.42 ±8.10 / 395.12 ms │     370.73 / 384.25 ±11.15 / 399.10 ms │     no change │
│ QQuery 46  │      214.78 / 221.59 ±5.20 / 230.70 ms │      218.07 / 225.89 ±5.07 / 234.02 ms │     no change │
│ QQuery 47  │      197.57 / 203.51 ±3.93 / 207.89 ms │      193.33 / 201.26 ±6.56 / 212.05 ms │     no change │
│ QQuery 48  │      210.92 / 217.09 ±4.87 / 222.72 ms │      208.46 / 214.28 ±3.54 / 218.77 ms │     no change │
│ QQuery 49  │      328.16 / 336.11 ±6.68 / 345.31 ms │      334.99 / 341.77 ±6.67 / 354.51 ms │     no change │
│ QQuery 50  │      342.82 / 354.60 ±7.36 / 364.06 ms │      346.43 / 351.85 ±4.97 / 360.05 ms │     no change │
│ QQuery 51  │      343.61 / 349.22 ±3.43 / 353.69 ms │     341.64 / 354.46 ±10.26 / 364.83 ms │     no change │
│ QQuery 52  │     422.55 / 433.68 ±10.90 / 448.36 ms │      422.27 / 432.13 ±9.14 / 449.40 ms │     no change │
│ QQuery 53  │      422.83 / 430.93 ±7.56 / 443.86 ms │      407.43 / 420.91 ±9.17 / 434.01 ms │     no change │
│ QQuery 54  │      447.44 / 454.37 ±5.29 / 461.16 ms │      445.76 / 449.82 ±3.76 / 454.91 ms │     no change │
│ QQuery 55  │      167.95 / 176.91 ±7.35 / 188.23 ms │      183.54 / 185.44 ±2.24 / 189.57 ms │     no change │
│ QQuery 56  │  2662.35 / 2691.18 ±23.92 / 2721.51 ms │  1971.47 / 2054.15 ±92.89 / 2230.13 ms │ +1.31x faster │
│ QQuery 57  │  2691.56 / 2731.83 ±29.37 / 2776.28 ms │ 2062.61 / 2188.79 ±147.01 / 2376.77 ms │ +1.25x faster │
│ QQuery 58  │ 2675.12 / 2905.13 ±259.29 / 3326.55 ms │  2034.22 / 2058.90 ±18.94 / 2083.74 ms │ +1.41x faster │
│ QQuery 59  │ 2715.16 / 2924.90 ±239.37 / 3285.41 ms │  2045.15 / 2137.57 ±74.08 / 2233.51 ms │ +1.37x faster │
│ QQuery 60  │  1584.53 / 1627.97 ±22.42 / 1646.01 ms │      965.22 / 974.66 ±9.07 / 987.18 ms │ +1.67x faster │
│ QQuery 61  │ 3852.06 / 3976.95 ±108.23 / 4154.64 ms │  1944.86 / 1996.06 ±52.03 / 2089.78 ms │ +1.99x faster │
│ QQuery 62  │  3923.29 / 4021.13 ±75.48 / 4130.53 ms │  1968.89 / 2035.84 ±54.34 / 2085.57 ms │ +1.98x faster │
│ QQuery 63  │ 4224.50 / 4334.65 ±102.75 / 4457.78 ms │  2017.15 / 2074.85 ±58.58 / 2160.62 ms │ +2.09x faster │
│ QQuery 64  │  1733.75 / 1772.45 ±29.73 / 1815.51 ms │  1008.86 / 1030.83 ±15.25 / 1054.85 ms │ +1.72x faster │
│ QQuery 65  │ 3948.89 / 4111.42 ±147.09 / 4319.83 ms │  1999.73 / 2046.24 ±35.46 / 2097.69 ms │ +2.01x faster │
│ QQuery 66  │      292.68 / 297.23 ±6.14 / 309.41 ms │      296.64 / 300.66 ±5.30 / 310.49 ms │     no change │
│ QQuery 67  │      265.74 / 277.86 ±9.30 / 293.01 ms │      270.54 / 284.66 ±9.21 / 295.74 ms │     no change │
│ QQuery 68  │      289.40 / 295.59 ±7.69 / 310.06 ms │      279.13 / 294.68 ±9.59 / 306.28 ms │     no change │
│ QQuery 69  │      565.97 / 581.04 ±9.97 / 595.58 ms │      601.76 / 608.93 ±7.23 / 621.56 ms │     no change │
│ QQuery 70  │     580.13 / 593.34 ±11.81 / 609.24 ms │      591.46 / 593.97 ±3.56 / 600.89 ms │     no change │
│ QQuery 71  │     559.34 / 584.82 ±19.78 / 618.97 ms │      585.72 / 596.90 ±8.15 / 606.70 ms │     no change │
│ QQuery 72  │     565.04 / 608.60 ±30.31 / 660.12 ms │     579.67 / 600.49 ±17.69 / 629.89 ms │     no change │
│ QQuery 73  │     265.91 / 284.64 ±20.39 / 322.66 ms │     272.28 / 286.74 ±17.07 / 317.90 ms │     no change │
│ QQuery 74  │      325.38 / 330.30 ±4.01 / 334.53 ms │      325.88 / 334.20 ±6.24 / 343.62 ms │     no change │
│ QQuery 75  │      277.47 / 282.27 ±5.27 / 291.01 ms │      279.45 / 283.32 ±3.08 / 286.41 ms │     no change │
│ QQuery 76  │     374.07 / 391.67 ±12.36 / 405.81 ms │      376.82 / 381.70 ±5.36 / 391.76 ms │     no change │
│ QQuery 77  │      357.30 / 365.52 ±5.94 / 373.15 ms │     351.20 / 371.43 ±11.50 / 385.01 ms │     no change │
│ QQuery 78  │     376.47 / 393.24 ±12.45 / 407.32 ms │      381.72 / 385.61 ±4.31 / 393.85 ms │     no change │
│ QQuery 79  │     448.85 / 463.46 ±11.61 / 482.85 ms │      445.41 / 452.76 ±4.07 / 457.76 ms │     no change │
│ QQuery 80  │      448.32 / 459.11 ±6.77 / 468.25 ms │      440.26 / 446.19 ±4.05 / 451.58 ms │     no change │
│ QQuery 81  │      476.74 / 484.11 ±5.24 / 489.67 ms │      463.59 / 476.81 ±9.75 / 488.81 ms │     no change │
│ QQuery 82  │      423.87 / 433.81 ±8.96 / 447.01 ms │     416.46 / 427.92 ±11.06 / 446.44 ms │     no change │
│ QQuery 83  │     377.36 / 387.99 ±10.23 / 402.90 ms │     373.26 / 392.62 ±14.41 / 414.25 ms │     no change │
│ QQuery 84  │      333.33 / 339.87 ±4.90 / 345.72 ms │      335.68 / 342.37 ±4.60 / 347.61 ms │     no change │
│ QQuery 85  │      383.43 / 389.01 ±5.38 / 398.79 ms │      374.00 / 386.28 ±8.91 / 399.21 ms │     no change │
│ QQuery 86  │      682.25 / 695.49 ±9.83 / 706.77 ms │     657.95 / 675.92 ±14.04 / 694.11 ms │     no change │
│ QQuery 87  │      601.23 / 607.97 ±4.91 / 616.16 ms │     592.92 / 620.33 ±20.80 / 646.23 ms │     no change │
│ QQuery 88  │      331.42 / 338.62 ±6.41 / 348.25 ms │      323.45 / 333.23 ±7.24 / 344.22 ms │     no change │
│ QQuery 89  │     319.32 / 334.50 ±21.64 / 377.20 ms │      316.08 / 326.85 ±7.54 / 335.89 ms │     no change │
│ QQuery 90  │     342.65 / 365.34 ±13.89 / 385.97 ms │      346.96 / 355.55 ±7.43 / 368.23 ms │     no change │
│ QQuery 91  │      312.09 / 325.35 ±8.12 / 334.72 ms │      328.23 / 336.81 ±8.75 / 351.98 ms │     no change │
│ QQuery 92  │     283.68 / 298.28 ±14.19 / 319.25 ms │      288.82 / 297.56 ±6.27 / 307.57 ms │     no change │
│ QQuery 93  │      312.87 / 320.75 ±7.22 / 333.27 ms │      310.11 / 323.02 ±9.48 / 337.46 ms │     no change │
│ QQuery 94  │      372.59 / 381.19 ±5.43 / 389.22 ms │     375.09 / 391.15 ±10.84 / 405.55 ms │     no change │
│ QQuery 95  │      370.00 / 383.26 ±9.20 / 396.91 ms │      383.27 / 390.17 ±5.66 / 399.58 ms │     no change │
│ QQuery 96  │      383.10 / 392.51 ±7.69 / 406.33 ms │     386.36 / 400.75 ±14.67 / 428.51 ms │     no change │
│ QQuery 97  │      420.10 / 431.71 ±9.96 / 446.43 ms │     428.30 / 443.26 ±11.86 / 456.35 ms │     no change │
│ QQuery 98  │      411.70 / 421.19 ±6.40 / 431.15 ms │      419.17 / 429.59 ±8.95 / 443.91 ms │     no change │
│ QQuery 99  │     495.99 / 518.78 ±14.16 / 537.33 ms │     476.57 / 523.70 ±25.01 / 548.26 ms │     no change │
│ QQuery 100 │      560.23 / 572.29 ±9.78 / 585.87 ms │      599.19 / 614.04 ±7.89 / 622.04 ms │  1.07x slower │
│ QQuery 101 │      534.67 / 541.39 ±4.47 / 547.99 ms │      547.06 / 551.95 ±4.66 / 560.39 ms │     no change │
│ QQuery 102 │  1031.52 / 1095.50 ±37.49 / 1137.94 ms │   968.70 / 1022.65 ±42.97 / 1066.96 ms │ +1.07x faster │
│ QQuery 103 │     301.51 / 321.54 ±14.18 / 336.11 ms │      311.57 / 325.83 ±7.15 / 330.22 ms │     no change │
│ QQuery 104 │      333.67 / 344.42 ±8.02 / 357.80 ms │     332.65 / 349.61 ±10.73 / 361.99 ms │     no change │
│ QQuery 105 │      306.97 / 314.39 ±8.48 / 328.64 ms │      311.48 / 315.83 ±3.87 / 320.49 ms │     no change │
│ QQuery 106 │      348.81 / 358.87 ±8.35 / 373.67 ms │     342.78 / 359.41 ±10.75 / 372.28 ms │     no change │
│ QQuery 107 │     344.77 / 361.53 ±12.48 / 377.08 ms │      353.85 / 357.75 ±3.17 / 363.21 ms │     no change │
│ QQuery 108 │     343.94 / 358.11 ±12.71 / 378.33 ms │      357.02 / 363.43 ±6.02 / 374.16 ms │     no change │
│ QQuery 109 │         17.16 / 18.29 ±1.84 / 21.96 ms │         17.32 / 19.45 ±3.03 / 25.46 ms │  1.06x slower │
│ QQuery 110 │         88.51 / 89.35 ±0.70 / 90.49 ms │         88.42 / 89.92 ±1.23 / 91.62 ms │     no change │
│ QQuery 111 │      227.33 / 232.45 ±2.83 / 235.98 ms │      228.60 / 234.57 ±3.40 / 238.15 ms │     no change │
│ QQuery 112 │      206.15 / 212.32 ±6.80 / 223.81 ms │      206.24 / 214.74 ±6.41 / 225.55 ms │     no change │
│ QQuery 113 │      227.12 / 237.57 ±8.15 / 248.94 ms │      236.77 / 239.91 ±2.77 / 244.11 ms │     no change │
└────────────┴────────────────────────────────────────┴────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary               ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)               │ 64989.07ms │
│ Total Time (redesign-join-ht)   │ 51959.95ms │
│ Average Time (HEAD)             │   575.12ms │
│ Average Time (redesign-join-ht) │   459.82ms │
│ Queries Faster                  │         19 │
│ Queries Slower                  │          5 │
│ Queries with No Change          │         89 │
│ Queries with Failure            │          0 │
└─────────────────────────────────┴────────────┘

Resource Usage

imdb — base (merge-base)

Metric Value
Wall time 430.1s
Peak memory 6.1 GiB
Avg memory 1.4 GiB
CPU user 2397.1s
CPU sys 86.3s
Peak spill 0 B

imdb — branch

Metric Value
Wall time 365.1s
Peak memory 5.6 GiB
Avg memory 1.3 GiB
CPU user 1677.5s
CPU sys 85.5s
Peak spill 0 B

File an issue against this benchmark runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement contiguous match storage for Hash Join indexing

4 participants