mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-10-09 05:46:20 +02:00
[DMDB] Notes on query processing, better summary for those, some exam notes
This commit is contained in:
1 parent
e08ee018a9
commit
9cec2e1028
17 files changed
+129
-26
No files matched your search
@@ -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