explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wsfR

Settings
# exclusive inclusive rows x rows loops node
1. 0.029 79.705 ↑ 2,000.0 1 1

Subquery Scan on subquery1 (cost=1,570.68..1,701.20 rows=2,000 width=29) (actual time=79.700..79.705 rows=1 loops=1)

2. 17.341 79.676 ↑ 2,000.0 1 1

HashAggregate (cost=1,570.68..1,581.20 rows=2,000 width=21) (actual time=79.673..79.676 rows=1 loops=1)

  • Group Key: ews_mrp_job_orders.name, (sum(ews_mrp_release_orders.release_qty))
3. 2.031 62.335 ↓ 598.0 1,196 1

Hash Join (cost=426.82..1,570.66 rows=2 width=21) (actual time=38.219..62.335 rows=1,196 loops=1)

  • Hash Cond: (ews_attendance_day.location_id = hr_locations.id)
4. 3.840 60.233 ↓ 27.9 1,257 1

Nested Loop (cost=424.37..1,568.00 rows=45 width=23) (actual time=38.115..60.233 rows=1,257 loops=1)

5. 1.990 51.365 ↓ 27.9 1,257 1

Nested Loop (cost=423.95..1,546.34 rows=45 width=25) (actual time=38.105..51.365 rows=1,257 loops=1)

6. 17.210 46.814 ↓ 3.2 13 1

Hash Join (cost=423.53..1,515.26 rows=4 width=17) (actual time=29.719..46.814 rows=13 loops=1)

  • Hash Cond: (mrp_bom.job_id = ews_mrp_job_orders.id)
7. 14.500 14.500 ↑ 1.0 16,589 1

Seq Scan on mrp_bom (cost=0.00..1,029.05 rows=16,705 width=8) (actual time=0.003..14.500 rows=16,589 loops=1)

8. 0.021 15.104 ↑ 1.0 1 1

Hash (cost=423.52..423.52 rows=1 width=17) (actual time=15.104..15.104 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 1.512 15.083 ↑ 1.0 1 1

Hash Right Join (cost=393.49..423.52 rows=1 width=17) (actual time=13.871..15.083 rows=1 loops=1)

  • Hash Cond: (ews_mrp_release_orders.release_order_id = ews_mrp_job_orders.id)
10. 6.398 13.546 ↓ 1.4 1,816 1

HashAggregate (cost=385.18..397.82 rows=1,264 width=8) (actual time=11.918..13.546 rows=1,816 loops=1)

  • Group Key: ews_mrp_release_orders.release_order_id
11. 7.148 7.148 ↓ 1.1 4,604 1

Seq Scan on ews_mrp_release_orders (cost=0.00..363.41 rows=4,353 width=8) (actual time=0.006..7.148 rows=4,604 loops=1)

  • Filter: (active AND (NOT obsolete) AND ((original_detail_code)::text = ANY ('{4,6,8}'::text[])))
  • Rows Removed by Filter: 2,888
12. 0.005 0.025 ↑ 1.0 1 1

Hash (cost=8.30..8.30 rows=1 width=9) (actual time=0.025..0.025 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.020 0.020 ↑ 1.0 1 1

Index Scan using ews_mrp_job_orders_job_name_uniq on ews_mrp_job_orders (cost=0.28..8.30 rows=1 width=9) (actual time=0.019..0.020 rows=1 loops=1)

  • Index Cond: ((name)::text = '1455'::text)
14. 2.561 2.561 ↑ 1.4 97 13

Index Scan using ews_attendace_bom_id_index on ews_attendance (cost=0.42..6.42 rows=135 width=18) (actual time=0.006..0.197 rows=97 loops=13)

  • Index Cond: (bom_id = mrp_bom.id)
  • Filter: (active AND (punch_out_time IS NOT NULL))
  • Rows Removed by Filter: 1
15. 5.028 5.028 ↑ 1.0 1 1,257

Index Scan using ews_attendance_day_pkey on ews_attendance_day (cost=0.42..0.47 rows=1 width=6) (actual time=0.003..0.004 rows=1 loops=1,257)

  • Index Cond: (id = ews_attendance.ews_attendance_day_id)
  • Filter: (sign_date <= '2020-05-31'::date)
16. 0.008 0.071 ↑ 1.0 1 1

Hash (cost=2.44..2.44 rows=1 width=4) (actual time=0.071..0.071 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 0.032 0.063 ↑ 1.0 1 1

Hash Join (cost=1.27..2.44 rows=1 width=4) (actual time=0.058..0.063 rows=1 loops=1)

  • Hash Cond: (hr_locations.location_id = ews_location.id)
18. 0.013 0.013 ↑ 1.0 11 1

Seq Scan on hr_locations (cost=0.00..1.11 rows=11 width=8) (actual time=0.004..0.013 rows=11 loops=1)

19. 0.009 0.018 ↑ 1.0 1 1

Hash (cost=1.26..1.26 rows=1 width=4) (actual time=0.018..0.018 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
20. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on ews_location (cost=0.00..1.26 rows=1 width=4) (actual time=0.007..0.009 rows=1 loops=1)

  • Filter: (partner_id = 5,628)
  • Rows Removed by Filter: 20
Planning time : 1.708 ms
Execution time : 80.110 ms