[DMDB] Fix issues, improve query processing with notes on time complexities

This commit is contained in:
2026-07-27 14:41:27 +02:00
parent d197d01f24
commit be2e079959
22 changed files with 142 additions and 34 deletions
@@ -16,7 +16,7 @@
We have $B$ buffer frames, of which one is reserved for the pages of $S$ and one is reserved for the output, thus the $B - 2$ blocks.
Each of these blocks houses $P_R / (B - 2))$ pages of $R$, reducing search costs by only scanning $S$ once for every block.
The cost here is $P_R + (P_R / (B - 2) \cdot P_S$ I/Os.
The cost here is \cost{$P_R + (P_R / (B - 2) \cdot P_S$ I/Os}.
If however, $R$ fits into memory, we have cost $P_R + P_S$ I/Os.
We can reduce that further by building as second step (right after the first for loop) a in-memory hash table for the tuples in the $R$ pages block.
This reduces the cost of comparisons, however, we need $(B - 2) \cdot f$ memory now.