Back to VisualizerSQL Explain Example
postgresql
PostgreSQL Aggregation
Understanding HashAggregate and GroupAggregate operations.
SELECT department, COUNT(*) FROM employees GROUP BY department;HashAggregate is used when grouping unsorted data. It builds a hash table of group keys and updates totals as it scans. GroupAggregate is used if the input is already sorted by the group key.
Interactive Execution Plan
EXPLAIN Output
Run: EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT TEXT) your_query;Enter SQL EXPLAIN output to visualizeSupports PostgreSQL EXPLAIN ANALYZE, MySQL EXPLAIN, and SQLite EXPLAIN QUERY PLAN formats