explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UYsb

Settings
# exclusive inclusive rows x rows loops node
1. 6.846 49.563 ↓ 5.2 2,007 1

Nested Loop Left Join (cost=101.55..3,847.60 rows=386 width=5) (actual time=0.849..49.563 rows=2,007 loops=1)

2. 8.292 36.696 ↓ 5.2 2,007 1

Nested Loop Left Join (cost=101.27..3,719.32 rows=386 width=4) (actual time=0.841..36.696 rows=2,007 loops=1)

3. 5.592 22.383 ↓ 5.2 2,007 1

Nested Loop (cost=100.98..3,590.81 rows=386 width=4) (actual time=0.832..22.383 rows=2,007 loops=1)

4. 5.527 10.801 ↓ 5.7 1,198 1

Hash Join (cost=100.56..1,597.20 rows=212 width=4) (actual time=0.819..10.801 rows=1,198 loops=1)

  • Hash Cond: (ews_attendance_day.location_id = hr_locations.id)
5. 4.781 5.226 ↓ 1.1 4,744 1

Bitmap Heap Scan on ews_attendance_day (cost=98.11..1,573.98 rows=4,458 width=6) (actual time=0.499..5.226 rows=4,744 loops=1)

  • Recheck Cond: ((sign_date >= '2019-07-01'::date) AND (sign_date <= '2019-07-31'::date))
  • Heap Blocks: exact=433
6. 0.445 0.445 ↓ 1.1 4,744 1

Bitmap Index Scan on ews_attendance_day_sign_date_index (cost=0.00..97.00 rows=4,458 width=0) (actual time=0.445..0.445 rows=4,744 loops=1)

  • Index Cond: ((sign_date >= '2019-07-01'::date) AND (sign_date <= '2019-07-31'::date))
7. 0.003 0.048 ↑ 1.0 1 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.017 0.045 ↑ 1.0 1 1

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

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

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

10. 0.004 0.014 ↑ 1.0 1 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 0.010 0.010 ↑ 1.0 1 1

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

  • Filter: (partner_id = 5,628)
  • Rows Removed by Filter: 20
12. 5.990 5.990 ↑ 1.5 2 1,198

Index Scan using ews_attendance_ews_attendance_day_id_index on ews_attendance (cost=0.42..9.37 rows=3 width=10) (actual time=0.003..0.005 rows=2 loops=1,198)

  • Index Cond: (ews_attendance_day_id = ews_attendance_day.id)
  • Filter: (active AND (punch_out_time IS NOT NULL))
  • Rows Removed by Filter: 0
13. 6.021 6.021 ↑ 1.0 1 2,007

Index Scan using mrp_bom_pkey on mrp_bom (cost=0.29..0.32 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=2,007)

  • Index Cond: (id = ews_attendance.bom_id)
14. 6.021 6.021 ↑ 1.0 1 2,007

Index Scan using ews_mrp_job_orders_pkey on ews_mrp_job_orders (cost=0.28..0.32 rows=1 width=9) (actual time=0.002..0.003 rows=1 loops=2,007)

  • Index Cond: (id = mrp_bom.job_id)
Planning time : 0.848 ms
Execution time : 51.234 ms