explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sldu

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Delete on planted_to_field pf (cost=3,161,211.33..8,560,085,762.57 rows=24,501,944 width=30) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3,161,211.33..8,560,085,762.57 rows=24,501,944 width=30) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash Join (cost=3,161,210.76..8,514,838,326.88 rows=10,302,744 width=40) (actual rows= loops=)

  • Hash Cond: (gep.planted_id = bp2.planted_id)
  • Join Filter: (bp.batch_id <> bp2.batch_id)
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,580,605.95..8,512,056,539.46 rows=10,370,815 width=34) (actual rows= loops=)

  • Hash Cond: (e.planted_id = bp.planted_id)
5. 0.000 0.000 ↓ 0.0

Merge Join (cost=1.13..8,509,320,933.08 rows=10,370,815 width=28) (actual rows= loops=)

  • Merge Cond: (gep.datetime_utc = e.datetime_utc)
  • Join Filter: ((gep.shape ~= e.shape) AND (e.planted_id <> gep.planted_id) AND _st_equals(gep.shape, e.shape))
6. 0.000 0.000 ↓ 0.0

Index Scan using events_planted_datetime_idx on planted gep (cost=0.56..54,422,183.22 rows=46,265,767 width=58) (actual rows= loops=)

  • Filter: (grower_id = 99)
7. 0.000 0.000 ↓ 0.0

Materialize (cost=0.56..54,537,847.64 rows=46,265,767 width=58) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using events_planted_datetime_idx on planted e (cost=0.56..54,422,183.22 rows=46,265,767 width=58) (actual rows= loops=)

  • Filter: (grower_id = 99)
9. 0.000 0.000 ↓ 0.0

Hash (cost=721,161.14..721,161.14 rows=46,812,214 width=22) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on batches_to_planted bp (cost=0.00..721,161.14 rows=46,812,214 width=22) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=721,161.14..721,161.14 rows=46,812,214 width=22) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on batches_to_planted bp2 (cost=0.00..721,161.14 rows=46,812,214 width=22) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using planted_to_field_planted_id_idx on planted_to_field pf (cost=0.57..3.94 rows=45 width=14) (actual rows= loops=)

  • Index Cond: (planted_id = gep.planted_id)