mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-09-10 19:15:25 +02:00
[DMDB] Notes on query processing, better summary for those, some exam notes
This commit is contained in:
@@ -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|\?|.
|
||||
Reference in New Issue
Block a user