explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L5Zq

Settings
# exclusive inclusive rows x rows loops node
1. 2.633 412.332 ↑ 1.0 1 1

Hash Join (cost=222.70..723.32 rows=1 width=76) (actual time=118.366..412.332 rows=1 loops=1)

  • Hash Cond: ((ard.absence_request_id = ar.id) AND (c.emp_id = ar.emp_id))
  • Join Filter: (ard.date > (SubPlan 3))
  • Rows Removed by Join Filter: 7
2.          

Initplan (forHash Join)

3. 0.031 0.031 ↑ 1.0 1 1

Seq Scan on hr_period (cost=0.00..1.20 rows=1 width=4) (actual time=0.028..0.031 rows=1 loops=1)

  • Filter: ((start_date <= (now())::date) AND (end_date >= (now())::date))
  • Rows Removed by Filter: 7
4. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on hr_period hr_period_1 (cost=0.00..1.20 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Filter: ((start_date <= (now())::date) AND (end_date >= (now())::date))
  • Rows Removed by Filter: 7
5. 5.934 11.448 ↓ 4.1 14,261 1

Hash Join (cost=5.95..488.10 rows=3,517 width=20) (actual time=0.101..11.448 rows=14,261 loops=1)

  • Hash Cond: (ard.afternoon_type_id = atc_rel.wrat_id)
6. 5.450 5.450 ↑ 1.0 18,470 1

Seq Scan on cesbron_absence_request_date ard (cost=0.00..377.72 rows=18,470 width=12) (actual time=0.027..5.450 rows=18,470 loops=1)

  • Filter: afternoon
  • Rows Removed by Filter: 102
7. 0.004 0.064 ↑ 1.0 4 1

Hash (cost=5.90..5.90 rows=4 width=16) (actual time=0.064..0.064 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.010 0.060 ↑ 1.0 4 1

Hash Join (cost=1.42..5.90 rows=4 width=16) (actual time=0.053..0.060 rows=4 loops=1)

  • Hash Cond: (c.type_id = atc_rel.hct_id)
9. 0.042 0.042 ↑ 1.0 2 1

Index Scan using hr_holidays_counter_pkey on hr_holidays_counter c (cost=0.28..4.71 rows=2 width=12) (actual time=0.037..0.042 rows=2 loops=1)

  • Index Cond: (id = ANY ('{10,11}'::integer[]))
10. 0.004 0.008 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=8) (actual time=0.007..0.008 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.004 0.004 ↑ 1.0 6 1

Seq Scan on hr_week_act_type_hol_count_type_rel atc_rel (cost=0.00..1.06 rows=6 width=8) (actual time=0.002..0.004 rows=6 loops=1)

12. 1.093 4.189 ↑ 1.0 4,415 1

Hash (cost=148.12..148.12 rows=4,415 width=8) (actual time=4.189..4.189 rows=4,415 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 237kB
13. 3.096 3.096 ↑ 1.0 4,415 1

Seq Scan on cesbron_absence_request ar (cost=0.00..148.12 rows=4,415 width=8) (actual time=0.027..3.096 rows=4,415 loops=1)

  • Filter: ((state)::text = ANY ('{validated,confirmed}'::text[]))
  • Rows Removed by Filter: 555
14.          

SubPlan (forHash Join)

15. 14.552 394.024 ↑ 1.0 1 8

Aggregate (cost=9,226.30..9,226.31 rows=1 width=4) (actual time=49.253..49.253 rows=1 loops=8)

16. 76.376 379.472 ↓ 4.0 10,306 8

Nested Loop (cost=0.86..9,219.78 rows=2,607 width=4) (actual time=0.025..47.434 rows=10,306 loops=8)

17. 55.752 55.752 ↓ 4.0 10,306 8

Index Scan using idx_timesheet_line_employee_id on hr_analytic_timesheet ts (cost=0.43..2,567.53 rows=2,607 width=4) (actual time=0.013..6.969 rows=10,306 loops=8)

  • Index Cond: (employee_id = ar.emp_id)
18. 247.344 247.344 ↑ 1.0 1 82,448

Index Scan using account_analytic_line_pkey on account_analytic_line aal (cost=0.43..2.55 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=82,448)

  • Index Cond: (id = ts.line_id)
Planning time : 2.195 ms