diff --git a/semester4/dmdb/data-modelling-databases-summary.pdf b/semester4/dmdb/data-modelling-databases-summary.pdf index de22bca..dd79495 100644 Binary files a/semester4/dmdb/data-modelling-databases-summary.pdf and b/semester4/dmdb/data-modelling-databases-summary.pdf differ diff --git a/semester4/dmdb/parts/08_quick-overview/03_qp.tex b/semester4/dmdb/parts/08_quick-overview/03_qp.tex index 2c8bf4b..870eaf5 100644 --- a/semester4/dmdb/parts/08_quick-overview/03_qp.tex +++ b/semester4/dmdb/parts/08_quick-overview/03_qp.tex @@ -17,8 +17,9 @@ Given $B$ frames of memory and $N$ records, we ahve \item For a clustered index, $\texttt{cnt}(P_F) = \texttt{cnt}(R') \div (F_L \cdot R_L)$, with $R_L$ the number of records per leaf page and $F_L$ the fill factor. \item For an unclustered index, $\texttt{cnt}(P_F) = \texttt{cnt}(R')$, with $\texttt{cnt}(R') = \texttt{cnt}(R) \cdot S$, with $S$ the selectivity of the predicate. \end{itemize} - \item \bi{Hash Index}: Cost is $1 + \texttt{cnt}(R') \div \texttt{cnt}(P_L) + \texttt{cnt}(R')$, where the $1$ is to do the lookup and - $\texttt{cnt}(R') \div P_L$, with $P_L$ the number of records per Leaf. + \item \bi{Hash Index}: Cost is $1 + \texttt{cnt}(R') \div \texttt{cnt}(P_L) + \texttt{cnt}(R')$, where the $1$ is to do the lookup, + $\texttt{cnt}(R') \div P_L$ to fetch the row IDs and $\texttt{cnt}(R')$ to fetch the records + (this is an up-to, it is $\texttt{cnt}(R') \div P_F$ as minimum, for clustered index), with $P_L$ the number of records per Leaf and $P_F$ the number of records per file. \end{itemize}