[DMDB] Notes on query processing, better summary for those, some exam notes

This commit is contained in:
2026-07-30 17:58:58 +02:00
parent e08ee018a9
commit 9cec2e1028
17 changed files with 129 additions and 26 deletions
@@ -1,5 +1,6 @@
For a basic \texttt{SELECT A, B FROM R} query, we scan the file and for each tuple output $A, B$.
Obviously, that means that for $N$ tuples and ratio of included tuples of $Q$, we have \cost{$N + N \cdot Q$} I/O operations.
($N$ to read, $N \cdot Q$ to write the filtered tuples)
For a \texttt{SELECT DISTINCT A, B FROM R} query, we scan the file and eliminate duplicates before outputting.
If this is also combined with a sort, we can prefer the sort-based approach and deduplicate after search,