explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5Klj

Settings
# exclusive inclusive rows x rows loops node
1. 1,260.479 27,578.050 ↓ 47.2 125,992 1

GroupAggregate (cost=314,577.97..314,637.98 rows=2,667 width=16) (actual time=25,019.876..27,578.050 rows=125,992 loops=1)

  • Group Key: m.row_num, m.period
2. 8,806.316 26,317.571 ↓ 4,390.8 11,710,155 1

Sort (cost=314,577.97..314,584.64 rows=2,667 width=24) (actual time=25,019.867..26,317.571 rows=11,710,155 loops=1)

  • Sort Key: m.row_num, m.period
  • Sort Method: external merge Disk: 389256kB
3. 1,260.797 17,511.255 ↓ 4,390.8 11,710,155 1

Nested Loop (cost=12.48..314,426.20 rows=2,667 width=24) (actual time=731.907..17,511.255 rows=11,710,155 loops=1)

4. 753.442 753.442 ↓ 126.0 125,992 1

Function Scan on aggregate_emissions e (cost=0.25..10.25 rows=1,000 width=16) (actual time=731.814..753.442 rows=125,992 loops=1)

5. 12,725.192 15,497.016 ↑ 1.4 93 125,992

Bitmap Heap Scan on matrix m (cost=12.23..313.09 rows=133 width=20) (actual time=0.035..0.123 rows=93 loops=125,992)

  • Recheck Cond: (col_num = e.node_id)
  • Filter: (e.period = period)
  • Rows Removed by Filter: 279
  • Heap Blocks: exact=23546640
6. 2,771.824 2,771.824 ↑ 1.4 372 125,992

Bitmap Index Scan on matrix_col_num_idx (cost=0.00..12.19 rows=533 width=0) (actual time=0.022..0.022 rows=372 loops=125,992)

  • Index Cond: (col_num = e.node_id)