explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MWg7

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.072 ↑ 2.5 2 1

Nested Loop Left Join (cost=39.90..57.90 rows=5 width=528) (actual time=0.038..0.072 rows=2 loops=1)

  • Join Filter: (d.drift_id = d_1.drift_id)
  • Filter: ((sp.linked_incident_id IS NULL) OR (hashed SubPlan 1))
  • Buffers: shared hit=7
2. 0.012 0.012 ↓ 2.0 2 1

Seq Scan on imt_iamsar_drift d (cost=0.00..1.02 rows=1 width=528) (actual time=0.011..0.012 rows=2 loops=1)

  • Filter: (NOT deleted)
  • Buffers: shared hit=1
3. 0.004 0.056 ↓ 0.0 0 2

Hash Join (cost=23.32..40.00 rows=20 width=8) (actual time=0.028..0.028 rows=0 loops=2)

  • Hash Cond: (dob.drift_id = d_1.drift_id)
  • Buffers: shared hit=6
4. 0.000 0.048 ↓ 0.0 0 2

Nested Loop (cost=22.28..38.90 rows=20 width=8) (actual time=0.024..0.024 rows=0 loops=2)

  • Buffers: shared hit=5
5. 0.017 0.048 ↓ 0.0 0 2

Hash Join (cost=22.13..25.65 rows=20 width=8) (actual time=0.024..0.024 rows=0 loops=2)

  • Hash Cond: (ds.drift_step_id = sp.step_id)
  • Buffers: shared hit=5
6. 0.020 0.020 ↑ 2.0 48 2

Seq Scan on imt_iamsar_drift_step ds (cost=0.00..2.96 rows=96 width=8) (actual time=0.004..0.010 rows=48 loops=2)

  • Buffers: shared hit=3
7. 0.000 0.011 ↓ 0.0 0 1

Hash (cost=21.88..21.88 rows=20 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=2
8. 0.002 0.011 ↓ 0.0 0 1

Hash Join (cost=10.97..21.88 rows=20 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Hash Cond: (sp.linked_incident_id = i.incident_id)
  • Buffers: shared hit=2
9. 0.004 0.004 ↑ 40.0 1 1

Seq Scan on sp_search_plan sp (cost=0.00..10.80 rows=40 width=8) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: (NOT deleted)
  • Buffers: shared hit=1
10. 0.000 0.005 ↓ 0.0 0 1

Hash (cost=10.60..10.60 rows=30 width=4) (actual time=0.005..0.005 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=1
11. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on im_incident i (cost=0.00..10.60 rows=30 width=4) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: (NOT deleted)
  • Rows Removed by Filter: 2
  • Buffers: shared hit=1
12. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_iamsar_drift_object on imt_iamsar_drift_object dob (cost=0.14..0.66 rows=1 width=8) (never executed)

  • Index Cond: (drift_object_id = ds.drift_object_id)
13. 0.002 0.004 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=4) (actual time=0.004..0.004 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
14. 0.002 0.002 ↑ 1.0 2 1

Seq Scan on imt_iamsar_drift d_1 (cost=0.00..1.02 rows=2 width=4) (actual time=0.002..0.002 rows=2 loops=1)

  • Buffers: shared hit=1
15.          

SubPlan (for Nested Loop Left Join)

16. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.28..16.58 rows=1 width=4) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sp_search_plan on sp_search_plan sp_1 (cost=0.14..8.16 rows=1 width=4) (never executed)

  • Index Cond: (search_plan_id = 13)
18. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_im_incident on im_incident ii (cost=0.14..8.16 rows=1 width=4) (never executed)

  • Index Cond: (incident_id = sp_1.linked_incident_id)
  • Heap Fetches: 0
Planning time : 2.339 ms
Execution time : 0.132 ms