explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rAuw

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 87.467 ↓ 0.0 0 1

Append (cost=403,532.59..1,262,145.38 rows=2,994 width=82) (actual time=87.467..87.467 rows=0 loops=1)

  • Buffers: shared hit=4,468
2. 0.000 0.338 ↓ 0.0 0 1

Unique (cost=403,532.59..403,592.89 rows=2,680 width=82) (actual time=0.338..0.338 rows=0 loops=1)

  • Buffers: shared hit=8
3. 0.029 0.338 ↓ 0.0 0 1

Sort (cost=403,532.59..403,539.29 rows=2,680 width=82) (actual time=0.338..0.338 rows=0 loops=1)

  • Sort Key: p.oid, p.payroll_cycle_oid, p.period_id, p.period_number, p.start_date, p.end_date, p.pay_date, p.status
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=8
4. 0.001 0.309 ↓ 0.0 0 1

Nested Loop (cost=4.73..403,379.99 rows=2,680 width=82) (actual time=0.309..0.309 rows=0 loops=1)

  • Buffers: shared hit=5
5. 0.000 0.308 ↓ 0.0 0 1

Nested Loop (cost=4.31..397,710.03 rows=324 width=7) (actual time=0.308..0.308 rows=0 loops=1)

  • Buffers: shared hit=5
6. 0.294 0.308 ↓ 0.0 0 1

Bitmap Heap Scan on chr_emp_position person (cost=4.31..16.66 rows=1 width=11) (actual time=0.308..0.308 rows=0 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(person.vpd_key))
  • Heap Blocks: exact=3
  • Buffers: shared hit=5
7. 0.014 0.014 ↑ 1.0 3 1

Bitmap Index Scan on chr_emp_position_idx15 (cost=0..4.31 rows=3 width=0) (actual time=0.014..0.014 rows=3 loops=1)

  • Index Cond: ((person.pfid)::text = '29449'::text)
  • Buffers: shared hit=2
8. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on pyr_pay_group ppg (cost=0..397,672.22 rows=940 width=16,818) (never executed)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(ppg.vpd_key))
9.          

SubPlan (for Seq Scan)

10. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule pps (cost=4.92..422.21 rows=1 width=7) (never executed)

  • Filter: ((pps.f_type = 'C'::bpchar) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(pps.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
11. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on pyr_payroll_schedule_idx5 (cost=0..4.92 rows=123 width=0) (never executed)

  • Index Cond: ((pps.payroll_cycle_oid)::text = (ppg.payroll_cycle_oid)::text)
12. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pyr_payroll_schedule_idx4 on pyr_payroll_schedule p (cost=0.42..17.42 rows=8 width=50) (never executed)

  • Index Cond: (((p.payroll_cycle_oid)::text = (ppg.payroll_cycle_oid)::text) AND (CURRENT_DATE >= p.start_date) AND (CURRENT_DATE <= p.end_date))
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(p.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (p.f_unscheduled = '0'::numeric))
13. 0.002 43.533 ↓ 0.0 0 1

Hash Join (cost=415,932.72..429,253.8 rows=158 width=82) (actual time=43.533..43.533 rows=0 loops=1)

  • Buffers: shared hit=2,230
14. 38.121 43.531 ↓ 0.0 0 1

Bitmap Heap Scan on pyr_payroll_schedule q (cost=3,626.93..12,151.49 rows=8,025 width=11) (actual time=43.531..43.531 rows=0 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(q.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (q.f_unscheduled = '0'::numeric))
  • Heap Blocks: exact=1,613
  • Buffers: shared hit=2,230
15. 5.410 5.410 ↑ 8.9 2,692 1

Bitmap Index Scan on pyr_payroll_schedule_idx4 (cost=0..3,624.92 rows=24,077 width=0) (actual time=5.41..5.41 rows=2,692 loops=1)

  • Index Cond: ((CURRENT_DATE >= q.start_date) AND (CURRENT_DATE <= q.end_date))
  • Buffers: shared hit=617
16. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=412,107.33..412,107.33 rows=13,231 width=57) (never executed)

17. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=4.31..412,107.33 rows=13,231 width=57) (never executed)

18. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=4.31..397,710.03 rows=324 width=7) (never executed)

19. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on chr_emp_position person_1 (cost=4.31..16.66 rows=1 width=11) (never executed)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(person_1.vpd_key))
20. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on chr_emp_position_idx15 (cost=0..4.31 rows=3 width=0) (never executed)

  • Index Cond: ((person_1.pfid)::text = '29449'::text)
21. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on pyr_pay_group ppg_1 (cost=0..397,672.22 rows=940 width=16,818) (never executed)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(ppg_1.vpd_key))
22.          

SubPlan (for Seq Scan)

23. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule pps_1 (cost=4.92..422.21 rows=1 width=7) (never executed)

  • Filter: ((pps_1.f_type = 'C'::bpchar) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(pps_1.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
24. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on pyr_payroll_schedule_idx5 (cost=0..4.92 rows=123 width=0) (never executed)

  • Index Cond: ((pps_1.payroll_cycle_oid)::text = (ppg_1.payroll_cycle_oid)::text)
25. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pyr_payroll_schedule_idx5 on pyr_payroll_schedule p_1 (cost=0..44.03 rows=41 width=50) (never executed)

  • Index Cond: ((p_1.payroll_cycle_oid)::text = (ppg_1.payroll_cycle_oid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(p_1.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (p_1.f_unscheduled = '0'::numeric))
26. 0.001 43.593 ↓ 0.0 0 1

Hash Join (cost=415,932.72..429,253.78 rows=156 width=82) (actual time=43.593..43.593 rows=0 loops=1)

  • Buffers: shared hit=2,230
27. 38.172 43.592 ↓ 0.0 0 1

Bitmap Heap Scan on pyr_payroll_schedule q_1 (cost=3,626.93..12,151.49 rows=8,025 width=11) (actual time=43.592..43.592 rows=0 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(q_1.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (q_1.f_unscheduled = '0'::numeric))
  • Heap Blocks: exact=1,613
  • Buffers: shared hit=2,230
28. 5.420 5.420 ↑ 8.9 2,692 1

Bitmap Index Scan on pyr_payroll_schedule_idx4 (cost=0..3,624.92 rows=24,077 width=0) (actual time=5.42..5.42 rows=2,692 loops=1)

  • Index Cond: ((CURRENT_DATE >= q_1.start_date) AND (CURRENT_DATE <= q_1.end_date))
  • Buffers: shared hit=617
29. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=412,107.33..412,107.33 rows=13,231 width=57) (never executed)

30. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=4.31..412,107.33 rows=13,231 width=57) (never executed)

31. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=4.31..397,710.03 rows=324 width=7) (never executed)

32. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on chr_emp_position person_2 (cost=4.31..16.66 rows=1 width=11) (never executed)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(person_2.vpd_key))
33. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on chr_emp_position_idx15 (cost=0..4.31 rows=3 width=0) (never executed)

  • Index Cond: ((person_2.pfid)::text = '29449'::text)
34. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on pyr_pay_group ppg_2 (cost=0..397,672.22 rows=940 width=16,818) (never executed)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(ppg_2.vpd_key))
35.          

SubPlan (for Seq Scan)

36. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule pps_2 (cost=4.92..422.21 rows=1 width=7) (never executed)

  • Filter: ((pps_2.f_type = 'C'::bpchar) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(pps_2.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
37. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on pyr_payroll_schedule_idx5 (cost=0..4.92 rows=123 width=0) (never executed)

  • Index Cond: ((pps_2.payroll_cycle_oid)::text = (ppg_2.payroll_cycle_oid)::text)
38. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pyr_payroll_schedule_idx5 on pyr_payroll_schedule p_2 (cost=0..44.03 rows=41 width=50) (never executed)

  • Index Cond: ((p_2.payroll_cycle_oid)::text = (ppg_2.payroll_cycle_oid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(p_2.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (p_2.f_unscheduled = '0'::numeric))
Planning time : 5.46 ms
Execution time : 87.946 ms