explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vZWS

Settings
# exclusive inclusive rows x rows loops node
1. 100.303 18,739.611 ↑ 21.6 334,158 1

Unique (cost=1,109,396.41..1,435,274.24 rows=7,229,920 width=64) (actual time=6,765.113..18,739.611 rows=334,158 loops=1)

2. 10,808.220 18,639.308 ↑ 21.6 334,158 1

GroupAggregate (cost=1,109,396.41..1,399,124.64 rows=7,229,920 width=64) (actual time=6,765.111..18,639.308 rows=334,158 loops=1)

  • Group Key: hr.created, hr.well_map_id, wm.id
3. 4,844.874 7,831.088 ↓ 1.0 7,452,048 1

Sort (cost=1,109,396.41..1,127,559.78 rows=7,265,349 width=54) (actual time=6,765.049..7,831.088 rows=7,452,048 loops=1)

  • Sort Key: hr.created, wm.id
  • Sort Method: quicksort Memory: 1169397kB
4. 1,398.458 2,986.214 ↓ 1.0 7,452,048 1

Hash Join (cost=820.08..281,415.41 rows=7,265,349 width=54) (actual time=5.577..2,986.214 rows=7,452,048 loops=1)

  • Hash Cond: (hr.well_map_id = wm.id)
5. 1,582.283 1,582.283 ↓ 1.0 7,452,048 1

Index Scan using history_reading_created_53ebfcf52c6038fc_uniq on history_reading hr (cost=0.59..261,520.08 rows=7,265,349 width=46) (actual time=0.017..1,582.283 rows=7,452,048 loops=1)

  • Index Cond: (created > (now() - '21 days'::interval))
  • Filter: (well_map_id IS NOT NULL)
  • Rows Removed by Filter: 103
6. 2.493 5.473 ↑ 1.0 18,778 1

Hash (cost=584.22..584.22 rows=18,822 width=8) (actual time=5.473..5.473 rows=18,778 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 990kB
7. 2.980 2.980 ↑ 1.0 18,778 1

Seq Scan on history_wellmapping wm (cost=0.00..584.22 rows=18,822 width=8) (actual time=0.004..2.980 rows=18,778 loops=1)

Planning time : 0.371 ms
Execution time : 18,831.306 ms