9951 explained code solutions for 126 technologies


clickhouseQuery EXPLAIN example


EXPLAIN SELECT...ctrl + c
EXPLAIN

will print explanation of the query execution plan

SELECT...

query to explain


Usage example

EXPLAIN SELECT * FROM large_table WHERE complex_col = 1
output
┌─explain───────────────────────────────────────────────────────────────────────────────┐
│ Expression (Projection)                                                               │
│   CreatingSets (Create sets before main query execution)                              │
│     Expression (Before ORDER BY)                                                      │
│       Filter (WHERE)                                                                  │
│         SettingQuotaAndLimits (Set limits and quota after reading from storage)       │
│           ReadFromMergeTree                                                           │
│     CreatingSet (Create set for subquery)                                             │
│       Expression (Projection)                                                         │
│         Limit (preliminary LIMIT (without OFFSET))                                    │
│           Sorting (Sorting for ORDER BY)                                              │
│             Expression (Before ORDER BY)                                              │
│               SettingQuotaAndLimits (Set limits and quota after reading from storage) │
│                 ReadFromMergeTree                                                     │
└───────────────────────────────────────────────────────────────────────────────────────┘