explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kavj

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

Nested Loop Left Join (cost=39.90..57.90 rows=5 width=528) (actual time=0.048..0.082 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.005 0.066 ↓ 0.0 0 2

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

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

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

  • Buffers: shared hit=5
5. 0.018 0.052 ↓ 0.0 0 2

Hash Join (cost=22.13..25.65 rows=20 width=8) (actual time=0.026..0.026 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.005..0.010 rows=48 loops=2)

  • Buffers: shared hit=3
7. 0.001 0.014 ↓ 0.0 0 1

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

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

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

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

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

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

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

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

Seq Scan on im_incident i (cost=0.00..10.60 rows=30 width=4) (actual time=0.006..0.006 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.005 0.007 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=4) (actual time=0.007..0.007 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 : 3.315 ms
Execution time : 0.166 ms