explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RAwg

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 5.081 ↓ 0.0 0 1

HashAggregate (cost=318,646.27..318,646.33 rows=6 width=368) (actual time=5.081..5.081 rows=0 loops=1)

  • Group Key: ppg.co_code, p.payroll_cycle_oid, p.start_date, p.end_date, p.payroll_cycle_oid, p.status
  • Buffers: shared hit=101
2. 0.001 5.080 ↓ 0.0 0 1

Append (cost=78,831.33..318,646.18 rows=6 width=368) (actual time=5.08..5.08 rows=0 loops=1)

  • Buffers: shared hit=101
3. 0.001 4.918 ↓ 0.0 0 1

Unique (cost=78,831.33..78,831.39 rows=4 width=42) (actual time=4.918..4.918 rows=0 loops=1)

  • Buffers: shared hit=95
4. 0.042 4.917 ↓ 0.0 0 1

Sort (cost=78,831.33..78,831.34 rows=4 width=42) (actual time=4.917..4.917 rows=0 loops=1)

  • Sort Key: ppg.co_code, p.payroll_cycle_oid, p.start_date, p.end_date, p.status
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=95
5. 0.001 4.875 ↓ 0.0 0 1

Nested Loop (cost=790.47..78,831.29 rows=4 width=42) (actual time=4.875..4.875 rows=0 loops=1)

  • Buffers: shared hit=89
6. 4.874 4.874 ↓ 0.0 0 1

Seq Scan on pyr_pay_group ppg (cost=0..77,235.24 rows=89 width=16,816) (actual time=4.874..4.874 rows=0 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(ppg.vpd_key))
  • Buffers: shared hit=89
7.          

SubPlan (for Seq Scan)

8. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule pps (cost=710.52..866.97 rows=1 width=6) (never executed)

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

Bitmap Index Scan on pyr_payroll_sch_indx2 (cost=0..710.52 rows=60 width=0) (never executed)

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

Materialize (cost=790.47..1,531.4 rows=41 width=36) (never executed)

11. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=790.47..1,531.2 rows=41 width=36) (never executed)

12. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on wfm_emp_pay_frequency e (cost=17.86..21.5 rows=1 width=16) (never executed)

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

Bitmap Index Scan on uq1_wfm_emp_pay_frequency (cost=0..17.86 rows=2 width=0) (never executed)

  • Index Cond: ((e.pfid)::text = '50301'::text)
14. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule p (cost=772.61..1,509.29 rows=41 width=28) (never executed)

  • Filter: (((p.status)::text <> 'SYS:227:24302'::text) AND (("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND (((p.start_date >= '2020-02-16'::date) AND (p.start_date <= '2020-02-29'::date)) OR ((p.end_date >= '2020-02-16'::date) AND (p.end_date <= '2020-02-29'::date)) OR ((p.start_date < '2020-02-16'::date) AND (p.end_date > '2020-02-29'::date))) AND vpd_sec_usr.f_sel_policy_all(p.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
15. 0.000 0.000 ↓ 0.0 0 0

Bitmap Index Scan on pyr_payroll_sch_indx1 (cost=0..772.59 rows=1,692 width=0) (never executed)

  • Index Cond: ((p.start_date <= e.eff_date_end) AND (p.end_date >= e.eff_date))
16. 0.001 0.106 ↓ 0.0 0 1

Limit (cost=158,960.14..158,960.15 rows=1 width=42) (actual time=0.106..0.106 rows=0 loops=1)

  • Buffers: shared hit=3
17. 0.000 0.105 ↓ 0.0 0 1

Unique (cost=158,960.14..158,968.21 rows=538 width=42) (actual time=0.105..0.105 rows=0 loops=1)

  • Buffers: shared hit=3
18. 0.006 0.105 ↓ 0.0 0 1

Sort (cost=158,960.14..158,961.48 rows=538 width=42) (actual time=0.105..0.105 rows=0 loops=1)

  • Sort Key: p_1.start_date, ppg_2.co_code, p_1.payroll_cycle_oid, p_1.end_date, p_1.status
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
19. 0.001 0.099 ↓ 0.0 0 1

Nested Loop (cost=0.57..158,935.74 rows=538 width=42) (actual time=0.099..0.099 rows=0 loops=1)

  • Buffers: shared hit=3
20. 0.000 0.098 ↓ 0.0 0 1

Nested Loop (cost=0.29..155,404.01 rows=24 width=14) (actual time=0.098..0.098 rows=0 loops=1)

  • Buffers: shared hit=3
21. 0.000 0.098 ↓ 0.0 0 1

Nested Loop (cost=0.29..78,166.77 rows=1 width=8) (actual time=0.098..0.098 rows=0 loops=1)

  • Buffers: shared hit=3
22. 0.098 0.098 ↓ 0.0 0 1

Seq Scan on wfm_emp_pay_frequency e_1 (cost=0..60.77 rows=1 width=12) (actual time=0.098..0.098 rows=0 loops=1)

  • Filter: (((e_1.pfid)::text = '50301'::text) AND (e_1.eff_date = '1970-01-01'::date) AND (("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(e_1.vpd_key))
  • Buffers: shared hit=3
23. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.29..78,105.98 rows=1 width=4) (never executed)

24. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.29..858.72 rows=7 width=18) (never executed)

25. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on wfm_emp_pay_frequency e1 (cost=0..60.77 rows=1 width=12) (never executed)

  • Filter: (((e1.pfid)::text = '50301'::text) AND (e1.eff_date_end = '4000-12-31'::date) AND (("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(e1.vpd_key))
26. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pyr_payroll_sch_indx1 on pyr_payroll_schedule p1 (cost=0.29..797.89 rows=6 width=10) (never executed)

  • Index Cond: (p1.start_date = e1.eff_date)
  • Filter: (((p1.status)::text <> 'SYS:227:24302'::text) AND (("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(p1.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
27. 0.000 0.000 ↓ 0.0 0 0

Materialize (cost=0..77,236.58 rows=89 width=14) (never executed)

28. 0.000 0.000 ↓ 0.0 0 0

Subquery Scan on c1 (cost=0..77,236.13 rows=89 width=14) (never executed)

29. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on pyr_pay_group ppg_1 (cost=0..77,235.24 rows=89 width=16,816) (never executed)

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

SubPlan (for Seq Scan)

31. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule pps_2 (cost=710.52..866.97 rows=1 width=6) (never executed)

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

Bitmap Index Scan on pyr_payroll_sch_indx2 (cost=0..710.52 rows=60 width=0) (never executed)

  • Index Cond: ((pps_2.payroll_cycle_oid)::text = (ppg_1.payroll_cycle_oid)::text)
33. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on pyr_pay_group ppg_2 (cost=0..77,235.24 rows=89 width=16,816) (never executed)

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

SubPlan (for Seq Scan)

35. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule pps_1 (cost=710.52..866.97 rows=1 width=6) (never executed)

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

Bitmap Index Scan on pyr_payroll_sch_indx2 (cost=0..710.52 rows=60 width=0) (never executed)

  • Index Cond: ((pps_1.payroll_cycle_oid)::text = (ppg_2.payroll_cycle_oid)::text)
37. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pyr_payroll_sch_indx2 on pyr_payroll_schedule p_1 (cost=0.29..146.96 rows=20 width=28) (never executed)

  • Index Cond: ((p_1.payroll_cycle_oid)::text = (ppg_2.payroll_cycle_oid)::text)
  • Filter: (((p_1.status)::text <> 'SYS:227:24302'::text) AND (("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(p_1.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
38. 0.000 0.055 ↓ 0.0 0 1

Limit (cost=80,854.51..80,854.53 rows=1 width=42) (actual time=0.055..0.055 rows=0 loops=1)

  • Buffers: shared hit=3
39. 0.001 0.055 ↓ 0.0 0 1

Unique (cost=80,854.51..80,862.69 rows=545 width=42) (actual time=0.055..0.055 rows=0 loops=1)

  • Buffers: shared hit=3
40. 0.007 0.054 ↓ 0.0 0 1

Sort (cost=80,854.51..80,855.87 rows=545 width=42) (actual time=0.054..0.054 rows=0 loops=1)

  • Sort Key: p_2.start_date, ppg_3.co_code, p_2.payroll_cycle_oid, p_2.end_date, p_2.status
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3
41. 0.000 0.047 ↓ 0.0 0 1

Nested Loop (cost=0.29..80,829.74 rows=545 width=42) (actual time=0.047..0.047 rows=0 loops=1)

  • Buffers: shared hit=3
42. 0.001 0.047 ↓ 0.0 0 1

Nested Loop (cost=0..77,298.02 rows=24 width=14) (actual time=0.047..0.047 rows=0 loops=1)

  • Buffers: shared hit=3
43. 0.046 0.046 ↓ 0.0 0 1

Seq Scan on wfm_emp_pay_frequency e_2 (cost=0..60.77 rows=1 width=8) (actual time=0.046..0.046 rows=0 loops=1)

  • Filter: (((e_2.pfid)::text = '50301'::text) AND (e_2.eff_date_end = '4000-12-31'::date) AND (("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(e_2.vpd_key))
  • Buffers: shared hit=3
44. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on pyr_pay_group ppg_3 (cost=0..77,235.24 rows=89 width=16,816) (never executed)

  • Filter: ((("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(ppg_3.vpd_key))
45.          

SubPlan (for Seq Scan)

46. 0.000 0.000 ↓ 0.0 0 0

Bitmap Heap Scan on pyr_payroll_schedule pps_3 (cost=710.52..866.97 rows=1 width=6) (never executed)

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

Bitmap Index Scan on pyr_payroll_sch_indx2 (cost=0..710.52 rows=60 width=0) (never executed)

  • Index Cond: ((pps_3.payroll_cycle_oid)::text = (ppg_3.payroll_cycle_oid)::text)
48. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pyr_payroll_sch_indx2 on pyr_payroll_schedule p_2 (cost=0.29..146.96 rows=20 width=28) (never executed)

  • Index Cond: ((p_2.payroll_cycle_oid)::text = (ppg_3.payroll_cycle_oid)::text)
  • Filter: (((p_2.status)::text <> 'SYS:227:24302'::text) AND (("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(p_2.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
Planning time : 5.284 ms
Execution time : 5.763 ms