[DMDB] Join, set up next sections

This commit is contained in:
2026-07-21 17:26:30 +02:00
parent 4c2405a497
commit 084167cef7
16 changed files with 168 additions and 7 deletions
@@ -0,0 +1,19 @@
\subsubsection{Index Nested Loops Join (INLJ)}
\begin{algorithm}
\caption{Nested Loops Join Algorithm}
\begin{algorithmic}[1]
\Procedure{IndexNestedLoopsJoin}{$R$, $S$}
\For{each page $p_R \in R$} \Comment{Outer loop}
\For{each tuple $t_r \in p_R$}
\State Probe the index on the join attribute of $S$ \Comment{Inner loop}
\State Add matching tuples to the join output
\EndFor
\EndFor
\EndProcedure
\end{algorithmic}
\end{algorithm}
The cost here is $P_R + T_R \cdot C(I_S)$ I/Os, with $P_X$ the number of pages in the relation $X$, $T_X$ the number of tuples in said relation
and $C(I_X)$ is the cost to probe the index $I_X$ of relation $X$ and depends on the clustering of data and type of index.
This operation needs three buffer frames. $1$ for $R$, $1$ for output and $1$ to traverse $I_S$