explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1TRc

Settings
# exclusive inclusive rows x rows loops node
1. 0.057 4,552.022 ↓ 1.1 323 1

Unique (cost=2,506,538.74..2,506,540.17 rows=285 width=4) (actual time=4,551.947..4,552.022 rows=323 loops=1)

2. 1.025 4,551.965 ↓ 2.2 633 1

Sort (cost=2,506,538.74..2,506,539.45 rows=285 width=4) (actual time=4,551.945..4,551.965 rows=633 loops=1)

  • Sort Key: a.municipality
  • Sort Method: quicksort Memory: 55kB
3. 0.028 4,550.940 ↓ 2.2 633 1

Append (cost=2,451,741.40..2,506,527.12 rows=285 width=4) (actual time=3,906.752..4,550.940 rows=633 loops=1)

4. 584.291 3,906.773 ↓ 2.3 310 1

HashAggregate (cost=2,451,741.40..2,451,767.80 rows=132 width=4) (actual time=3,906.750..3,906.773 rows=310 loops=1)

  • Group Key: a.municipality
5. 3,322.482 3,322.482 ↑ 1.0 4,569,996 1

Seq Scan on d_line a (cost=0.00..2,440,304.45 rows=4,574,781 width=4) (actual time=20.792..3,322.482 rows=4,569,996 loops=1)

  • Filter: ((municipality IS NOT NULL) AND (municipality <> ''::text) AND (is_active = 1))
  • Rows Removed by Filter: 6,192,913
6. 17.549 644.139 ↓ 2.1 323 1

HashAggregate (cost=54,671.72..54,702.32 rows=153 width=4) (actual time=644.115..644.139 rows=323 loops=1)

  • Group Key: b.municipality
7. 626.590 626.590 ↓ 1.0 115,176 1

Seq Scan on d_elec_asset b (cost=0.00..54,384.07 rows=115,063 width=4) (actual time=13.475..626.590 rows=115,176 loops=1)

  • Filter: ((municipality IS NOT NULL) AND (municipality <> ''::text) AND (is_active = 1))
  • Rows Removed by Filter: 129,317
Planning time : 152.761 ms
Execution time : 4,552.125 ms