Understanding where time goes in a query during execution is of upmost importance. It is the result of the precise and restrictive formulation of the SQL statement, its compilation into a logical query plan, its subsequent morphing into a physical execution plan, and finally the execution traces themselves.
This phase of application development, and even more so during maintenance and development of the MonetDB code itself, is supported by a few SQL statement modifiers. They are part of the SQL syntax and can be used also using the JDBC/ODBC interfaces, because they return a ordinary result table.
EXPLAIN SQL statement, to access the logical and physical MAL plan.
TRACE SQL statement, to retrieve the execution trace of the MAL plan.