explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DgQ

Settings
# exclusive inclusive rows x rows loops node
1. 5.851 41.708 ↓ 4.2 1,744 1

Nested Loop Left Join (cost=109.25..3,975.21 rows=417 width=5) (actual time=0.681..41.708 rows=1,744 loops=1)

2. 5.126 32.369 ↓ 4.2 1,744 1

Nested Loop Left Join (cost=108.97..3,836.63 rows=417 width=4) (actual time=0.673..32.369 rows=1,744 loops=1)

3. 4.580 22.011 ↓ 4.2 1,744 1

Nested Loop (cost=108.68..3,697.80 rows=417 width=4) (actual time=0.655..22.011 rows=1,744 loops=1)

4. 5.316 11.676 ↓ 5.0 1,151 1

Hash Join (cost=108.26..1,612.00 rows=229 width=4) (actual time=0.627..11.676 rows=1,151 loops=1)

  • Hash Cond: (ews_attendance_day.location_id = hr_locations.id)
5. 5.838 6.315 ↓ 1.1 5,200 1

Bitmap Heap Scan on ews_attendance_day (cost=105.81..1,587.10 rows=4,819 width=6) (actual time=0.564..6.315 rows=5,200 loops=1)

  • Recheck Cond: ((sign_date >= '2019-10-01'::date) AND (sign_date <= '2019-10-31'::date))
  • Heap Blocks: exact=671
6. 0.477 0.477 ↓ 1.1 5,200 1

Bitmap Index Scan on ews_attendance_day_sign_date_index (cost=0.00..104.61 rows=4,819 width=0) (actual time=0.477..0.477 rows=5,200 loops=1)

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

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.016 0.042 ↑ 1.0 1 1

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

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

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

10. 0.006 0.017 ↑ 1.0 1 1

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

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

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

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

Index Scan using ews_attendance_ews_attendance_day_id_index on ews_attendance (cost=0.42..9.08 rows=3 width=10) (actual time=0.004..0.005 rows=2 loops=1,151)

  • 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. 5.232 5.232 ↑ 1.0 1 1,744

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=1,744)

  • Index Cond: (id = ews_attendance.bom_id)
14. 3.488 3.488 ↑ 1.0 1 1,744

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.002 rows=1 loops=1,744)

  • Index Cond: (id = mrp_bom.job_id)
Planning time : 0.933 ms
Execution time : 43.042 ms