[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
@@ -0,0 +1,12 @@
\subsection{SQL}
DuckDB (and PostgreSQL) features an \texttt{EXPLAIN} and \texttt{EXPLAIN ANALYZE} query,
pretty-printing the query plan and pretty-printing the query plan and profiling the query execution, respectively
A few useful commands for debugging and writing queries (for DuckDB and PostgreSQL via \texttt{psql} CLI):
\begin{tables}{p{4cm}p{4cm}p{8cm}}{DuckDB & PostgreSQL & Description}
\texttt{SHOW TABLES;} & \verb|\dt| & Show all tables \\
\texttt{SHOW tablename;} & \verb|\d tablename| & Show schema of table \texttt{tablename} \\
\end{tables}
Note that \texttt{SHOW} and \texttt{DESCRIBE} are aliases in DuckDB. They can also be used on queries!.
To see all \texttt{psql} commands, run \verb|\?|.