explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nRZD

Settings
# exclusive inclusive rows x rows loops node
1. 0.117 903.058 ↑ 1.0 1 1

Aggregate (cost=84,980.67..84,980.68 rows=1 width=7) (actual time=903.057..903.058 rows=1 loops=1)

2. 53.014 902.941 ↓ 19.8 198 1

Hash Right Join (cost=5,851.16..84,980.64 rows=10 width=7) (actual time=120.948..902.941 rows=198 loops=1)

  • Hash Cond: (ml.m_requisitionline_id = rl.m_requisitionline_id)
3. 669.514 838.927 ↓ 1.0 1,258,964 1

Hash Join (cost=4,540.64..79,169.73 rows=1,200,102 width=16) (actual time=44.928..838.927 rows=1,258,964 loops=1)

  • Hash Cond: (ml.m_movement_id = mov.m_movement_id)
4. 124.623 124.623 ↓ 1.0 1,259,010 1

Seq Scan on m_movementline ml (cost=0.00..58,121.78 rows=1,201,678 width=23) (actual time=0.002..124.623 rows=1,259,010 loops=1)

5. 13.965 44.790 ↑ 1.0 88,736 1

Hash (cost=3,426.82..3,426.82 rows=89,106 width=7) (actual time=44.790..44.790 rows=88,736 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 4404kB
6. 30.825 30.825 ↑ 1.0 88,736 1

Seq Scan on m_movement mov (cost=0.00..3,426.82 rows=89,106 width=7) (actual time=0.021..30.825 rows=88,736 loops=1)

  • Filter: (docstatus = ANY ('{CO,CL,IP}'::bpchar[]))
  • Rows Removed by Filter: 4
7. 0.056 11.000 ↓ 19.8 198 1

Hash (cost=1,310.39..1,310.39 rows=10 width=14) (actual time=11.000..11.000 rows=198 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
8. 0.036 10.944 ↓ 19.8 198 1

Hash Left Join (cost=235.78..1,310.39 rows=10 width=14) (actual time=3.171..10.944 rows=198 loops=1)

  • Hash Cond: (lower((r.license)::text) = lower((li.name)::text))
9. 0.064 10.908 ↓ 19.8 198 1

Nested Loop (cost=223.53..1,298.03 rows=10 width=112) (actual time=3.158..10.908 rows=198 loops=1)

  • Join Filter: (r.c_doctype_id = dc.c_doctype_id)
10. 0.035 0.035 ↑ 1.0 1 1

Seq Scan on c_doctype dc (cost=0.00..4.46 rows=1 width=6) (actual time=0.023..0.035 rows=1 loops=1)

  • Filter: (docbasetype = 'IMR'::bpchar)
  • Rows Removed by Filter: 116
11. 6.198 10.809 ↓ 19.8 198 1

Hash Join (cost=223.53..1,293.44 rows=10 width=118) (actual time=3.129..10.809 rows=198 loops=1)

  • Hash Cond: (rl.m_requisition_id = r.m_requisition_id)
12. 2.535 2.535 ↓ 1.1 29,553 1

Seq Scan on m_requisitionline rl (cost=0.00..964.86 rows=27,986 width=14) (actual time=0.001..2.535 rows=29,553 loops=1)

13. 0.011 2.076 ↓ 24.0 24 1

Hash (cost=223.52..223.52 rows=1 width=111) (actual time=2.076..2.076 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
14. 0.016 2.065 ↓ 24.0 24 1

Nested Loop (cost=0.00..223.52 rows=1 width=111) (actual time=0.794..2.065 rows=24 loops=1)

15. 0.057 1.929 ↓ 24.0 24 1

Nested Loop (cost=0.00..222.12 rows=1 width=118) (actual time=0.788..1.929 rows=24 loops=1)

  • Join Filter: (r.m_warehouse_id = w.m_warehouse_id)
  • Rows Removed by Join Filter: 312
16. 1.344 1.344 ↓ 24.0 24 1

Seq Scan on m_requisition r (cost=0.00..220.10 rows=1 width=135) (actual time=0.765..1.344 rows=24 loops=1)

  • Rows Removed by Filter: 2039
17. 0.528 0.528 ↑ 1.0 14 24

Seq Scan on m_warehouse w (cost=0.00..1.85 rows=14 width=16) (actual time=0.011..0.022 rows=14 loops=24)

  • Filter: (m_warehouse_id = ANY ('{1000020,1000010,10015300,1000015,1000007,1000014,11893001,1000012,1000013,1000006,11893000,1000005,1000001,1000021}'::numeric[]))
  • Rows Removed by Filter: 17
18. 0.120 0.120 ↑ 1.0 1 24

Seq Scan on m_warehouse wr (cost=0.00..1.39 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=24)

  • Filter: (m_warehouse_id = '11893000'::numeric)
  • Rows Removed by Filter: 30
19. 0.000 0.000 ↓ 0.0 0 1

Hash (cost=11.00..11.00 rows=100 width=98) (actual time=0.000..0.000 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
20. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on m_license li (cost=0.00..11.00 rows=100 width=98) (actual time=0.000..0.000 rows=0 loops=1)