explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NBtQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 37.505 ↑ 56.0 3 1

Append (cost=0.28..187,746.45 rows=168 width=82) (actual time=1.366..37.505 rows=3 loops=1)

  • Buffers: shared hit=278
2. 0.003 11.451 ↑ 162.0 1 1

Nested Loop (cost=0.28..60,601.14 rows=162 width=82) (actual time=1.365..11.451 rows=1 loops=1)

  • Buffers: shared hit=90
3. 0.003 10.296 ↑ 76.0 1 1

Nested Loop (cost=0.28..56,197.93 rows=76 width=7) (actual time=0.451..10.296 rows=1 loops=1)

  • Buffers: shared hit=86
4. 0.309 0.309 ↑ 1.0 1 1

Index Scan using pk_chr_emp_position on chr_emp_position person (cost=0.28..286.34 rows=1 width=8) (actual time=0.215..0.309 rows=1 loops=1)

  • Index Cond: ((pfid)::text = '96861'::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(vpd_key))
  • Buffers: shared hit=54
5. 9.900 9.984 ↑ 71.0 4 1

Seq Scan on pyr_pay_group ppg (cost=0..55,905.2 rows=284 width=16,817) (actual time=0.134..9.984 rows=4 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(vpd_key))
  • Buffers: shared hit=32
6.          

SubPlan (for Seq Scan)

7. 0.068 0.084 ↓ 0.0 0 4

Bitmap Heap Scan on pyr_payroll_schedule pps (cost=4.42..196.01 rows=1 width=7) (actual time=0.021..0.021 rows=0 loops=4)

  • Filter: ((f_type = 'C'::bpchar) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
  • Heap Blocks: exact=15
  • Buffers: shared hit=20
8. 0.016 0.016 ↑ 1.0 55 4

Bitmap Index Scan on pyr_payroll_schedule_idx5 (cost=0..4.42 rows=56 width=0) (actual time=0.004..0.004 rows=55 loops=4)

  • Index Cond: ((payroll_cycle_oid)::text = (ppg.payroll_cycle_oid)::text)
  • Buffers: shared hit=5
9. 1.152 1.152 ↑ 2.0 1 1

Index Scan using pyr_payroll_schedule_idx5 on pyr_payroll_schedule p (cost=0..57.92 rows=2 width=50) (actual time=0.913..1.152 rows=1 loops=1)

  • Index Cond: ((payroll_cycle_oid)::text = (ppg.payroll_cycle_oid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (f_unscheduled = '0'::numeric) AND (date_trunc('DAY'::text, sysdate(NULL::timestamp without time zone)) >= start_date) AND (date_trunc('DAY'::text, sysdate(NULL::timestamp without time zone)) <= end_date))
  • Buffers: shared hit=4
10. 0.003 12.322 ↑ 3.0 1 1

Nested Loop (cost=0.28..63,571.4 rows=3 width=82) (actual time=2.008..12.322 rows=1 loops=1)

  • Buffers: shared hit=94
11. 0.002 11.376 ↑ 163.0 1 1

Nested Loop (cost=0.28..60,601.14 rows=163 width=18) (actual time=1.263..11.376 rows=1 loops=1)

  • Buffers: shared hit=90
12. 0.004 10.218 ↑ 76.0 1 1

Nested Loop (cost=0.28..56,197.93 rows=76 width=7) (actual time=0.345..10.218 rows=1 loops=1)

  • Buffers: shared hit=86
13. 0.221 0.221 ↑ 1.0 1 1

Index Scan using pk_chr_emp_position on chr_emp_position person_1 (cost=0.28..286.34 rows=1 width=8) (actual time=0.132..0.221 rows=1 loops=1)

  • Index Cond: ((pfid)::text = '96861'::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(vpd_key))
  • Buffers: shared hit=54
14. 9.921 9.993 ↑ 71.0 4 1

Seq Scan on pyr_pay_group ppg_1 (cost=0..55,905.2 rows=284 width=16,817) (actual time=0.119..9.993 rows=4 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(vpd_key))
  • Buffers: shared hit=32
15.          

SubPlan (for Seq Scan)

16. 0.056 0.072 ↓ 0.0 0 4

Bitmap Heap Scan on pyr_payroll_schedule pps_1 (cost=4.42..196.01 rows=1 width=7) (actual time=0.018..0.018 rows=0 loops=4)

  • Filter: ((f_type = 'C'::bpchar) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
  • Heap Blocks: exact=15
  • Buffers: shared hit=20
17. 0.016 0.016 ↑ 1.0 55 4

Bitmap Index Scan on pyr_payroll_schedule_idx5 (cost=0..4.42 rows=56 width=0) (actual time=0.004..0.004 rows=55 loops=4)

  • Index Cond: ((payroll_cycle_oid)::text = (ppg_1.payroll_cycle_oid)::text)
  • Buffers: shared hit=5
18. 1.156 1.156 ↑ 2.0 1 1

Index Scan using pyr_payroll_schedule_idx5 on pyr_payroll_schedule q (cost=0..57.92 rows=2 width=11) (actual time=0.916..1.156 rows=1 loops=1)

  • Index Cond: ((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(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (f_unscheduled = '0'::numeric) AND (date_trunc('DAY'::text, sysdate(NULL::timestamp without time zone)) >= start_date) AND (date_trunc('DAY'::text, sysdate(NULL::timestamp without time zone)) <= end_date))
  • Buffers: shared hit=4
19. 0.943 0.943 ↑ 1.0 1 1

Index Scan using pyr_payroll_schedule_idx5 on pyr_payroll_schedule p_1 (cost=0..18.21 rows=1 width=50) (actual time=0.742..0.943 rows=1 loops=1)

  • Index Cond: ((payroll_cycle_oid)::text = (q.payroll_cycle_oid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (f_unscheduled = '0'::numeric) AND (start_date = (q.end_date + 1)))
  • Buffers: shared hit=4
20. 0.002 13.729 ↑ 3.0 1 1

Nested Loop (cost=0.28..63,571.4 rows=3 width=82) (actual time=2.026..13.729 rows=1 loops=1)

  • Buffers: shared hit=94
21. 0.002 12.791 ↑ 163.0 1 1

Nested Loop (cost=0.28..60,601.14 rows=163 width=18) (actual time=1.247..12.791 rows=1 loops=1)

  • Buffers: shared hit=90
22. 0.004 11.638 ↑ 76.0 1 1

Nested Loop (cost=0.28..56,197.93 rows=76 width=7) (actual time=0.333..11.638 rows=1 loops=1)

  • Buffers: shared hit=86
23. 0.221 0.221 ↑ 1.0 1 1

Index Scan using pk_chr_emp_position on chr_emp_position person_2 (cost=0.28..286.34 rows=1 width=8) (actual time=0.125..0.221 rows=1 loops=1)

  • Index Cond: ((pfid)::text = '96861'::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(vpd_key))
  • Buffers: shared hit=54
24. 11.341 11.413 ↑ 71.0 4 1

Seq Scan on pyr_pay_group ppg_2 (cost=0..55,905.2 rows=284 width=16,817) (actual time=0.114..11.413 rows=4 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(vpd_key))
  • Buffers: shared hit=32
25.          

SubPlan (for Seq Scan)

26. 0.056 0.072 ↓ 0.0 0 4

Bitmap Heap Scan on pyr_payroll_schedule pps_2 (cost=4.42..196.01 rows=1 width=7) (actual time=0.018..0.018 rows=0 loops=4)

  • Filter: ((f_type = 'C'::bpchar) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
  • Heap Blocks: exact=15
  • Buffers: shared hit=20
27. 0.016 0.016 ↑ 1.0 55 4

Bitmap Index Scan on pyr_payroll_schedule_idx5 (cost=0..4.42 rows=56 width=0) (actual time=0.003..0.004 rows=55 loops=4)

  • Index Cond: ((payroll_cycle_oid)::text = (ppg_2.payroll_cycle_oid)::text)
  • Buffers: shared hit=5
28. 1.151 1.151 ↑ 2.0 1 1

Index Scan using pyr_payroll_schedule_idx5 on pyr_payroll_schedule q_1 (cost=0..57.92 rows=2 width=11) (actual time=0.912..1.151 rows=1 loops=1)

  • Index Cond: ((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(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (f_unscheduled = '0'::numeric) AND (date_trunc('DAY'::text, sysdate(NULL::timestamp without time zone)) >= start_date) AND (date_trunc('DAY'::text, sysdate(NULL::timestamp without time zone)) <= end_date))
  • Buffers: shared hit=4
29. 0.936 0.936 ↑ 1.0 1 1

Index Scan using pyr_payroll_schedule_idx5 on pyr_payroll_schedule p_2 (cost=0..18.21 rows=1 width=50) (actual time=0.776..0.936 rows=1 loops=1)

  • Index Cond: ((payroll_cycle_oid)::text = (q_1.payroll_cycle_oid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying) AND (f_unscheduled = '0'::numeric) AND (end_date = (q_1.start_date - 1)))
  • Buffers: shared hit=4
Planning time : 4.138 ms
Execution time : 37.905 ms