Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ run `cargo run -p tpcc --release` to run tpcc
- Tips: TPC-C currently only supports single thread
```shell
<90th Percentile RT (MaxRT)>
New-Order : 0.002 (0.004)
Payment : 0.001 (0.025)
Order-Status : 0.053 (0.175)
Delivery : 0.022 (0.027)
Stock-Level : 0.003 (0.019)
New-Order : 0.002 (0.025)
Payment : 0.001 (0.013)
Order-Status : 0.054 (0.159)
Delivery : 0.020 (0.034)
Stock-Level : 0.003 (0.004)
<TpmC>
7815 tpmC
7892 Tpmc
```
#### 👉[check more](tpcc/README.md)

Expand Down
20 changes: 9 additions & 11 deletions src/execution/dql/index_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,15 @@ impl<'a, T: Transaction + 'a> ReadExecutor<'a, T> for IndexScan {
..
} = self.op;

let mut iter = unsafe { &(*transaction) }
.read_by_index(
table_cache,
table_name,
limit,
columns,
self.index_by,
self.ranges,
with_pk,
)
.unwrap();
let mut iter = throw!(unsafe { &(*transaction) }.read_by_index(
table_cache,
table_name,
limit,
columns,
self.index_by,
self.ranges,
with_pk,
));

while let Some(tuple) = throw!(iter.next_tuple()) {
yield Ok(tuple);
Expand Down
17 changes: 4 additions & 13 deletions src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1208,19 +1208,10 @@ pub trait Iter {
}

fn remap_pk_indices(projection: &[usize], pk_indices: &[usize]) -> Vec<usize> {
let mut result = Vec::with_capacity(pk_indices.len());
let mut proj_idx = 0;
let mut pk_idx = 0;

while pk_idx < pk_indices.len() && proj_idx < projection.len() {
if projection[proj_idx] == pk_indices[pk_idx] {
result.push(proj_idx);
pk_idx += 1;
} else {
proj_idx += 1;
}
}
result
pk_indices
.iter()
.filter_map(|pk| projection.binary_search(pk).ok())
.collect()
}

#[cfg(test)]
Expand Down
Loading