explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aZ2M

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.139 ↓ 0.0 0 1

Unique (cost=1,981.65..1,981.66 rows=1 width=6) (actual time=0.139..0.139 rows=0 loops=1)

  • Buffers: shared hit=9
2.          

CTE time_pair_and_card_data

3. 0.000 0.117 ↓ 0.0 0 1

Nested Loop (cost=11.7..1,804.31 rows=1 width=32) (actual time=0.117..0.117 rows=0 loops=1)

  • Buffers: shared hit=3
4.          

Initplan (for Nested Loop)

5. 0.070 0.070 ↑ 1.0 1 1

Result (cost=0..0.26 rows=1 width=32) (actual time=0.069..0.07 rows=1 loops=1)

6. 0.003 0.117 ↓ 0.0 0 1

Bitmap Heap Scan on wfm_timepair tp_1 (cost=11.01..1,063.06 rows=85 width=42) (actual time=0.117..0.117 rows=0 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(tp_1.vpd_key, 'WFM_TIMEPAIR'::character varying))
  • Buffers: shared hit=3
7. 0.114 0.114 ↓ 0.0 0 1

Bitmap Index Scan on timepair16_idx (cost=0..10.99 rows=256 width=0) (actual time=0.114..0.114 rows=0 loops=1)

  • Index Cond: (((tp_1.vpd_key)::text = ($0)::text) AND (tp_1.paydate >= '2020-03-25'::date))
  • Buffers: shared hit=3
8. 0.000 0.000 ↓ 0.0 0 0

Index Scan using timecard1_uq on wfm_timecard tc (cost=0.42..8.71 rows=1 width=38) (never executed)

  • Index Cond: (((tc.vpd_key)::text = ($0)::text) AND ((tc.employeeid)::text = (tp_1.employeeid)::text))
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(tc.vpd_key, 'WFM_TIMECARD'::character varying) AND ((tc.objectid)::numeric = tp_1.timecardoid))
9.          

Initplan (for Unique)

10. 0.000 0.000 ↓ 0.0 0 0

Result (cost=0..0.26 rows=1 width=32) (never executed)

11. 0.021 0.139 ↓ 0.0 0 1

Sort (cost=177.08..177.08 rows=1 width=6) (actual time=0.139..0.139 rows=0 loops=1)

  • Sort Key: tp.paydate, pt.payroll_status
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=9
12. 0.000 0.118 ↓ 0.0 0 1

Nested Loop (cost=0.85..177.07 rows=1 width=6) (actual time=0.118..0.118 rows=0 loops=1)

  • Buffers: shared hit=3
13. 0.000 0.118 ↓ 0.0 0 1

Nested Loop (cost=0.43..8.74 rows=1 width=124) (actual time=0.118..0.118 rows=0 loops=1)

  • Buffers: shared hit=3
14. 0.118 0.118 ↓ 0.0 0 1

CTE Scan on time_pair_and_card_data tp (cost=0..0.02 rows=1 width=248) (actual time=0.118..0.118 rows=0 loops=1)

  • Buffers: shared hit=3
15. 0.000 0.000 ↓ 0.0 0 0

Index Scan using payroll5_idx on wfm_payroll pt (cost=0.43..8.71 rows=1 width=17) (never executed)

  • Index Cond: (pt.timepairoid = tp.objectid)
  • Filter: (((pt.vpd_key)::text = ($4)::text) AND ((pt.vpd_key)::text = (tp.vpd_key)::text) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(pt.vpd_key, 'WFM_PAYROLL'::character varying))
16. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pyr_payroll_schedule_idx4 on pyr_payroll_schedule pyr_payroll_schedule (cost=0.42..168.14 rows=15 width=7) (never executed)

  • Index Cond: (((pyr_payroll_schedule.payroll_cycle_oid)::text = '11458'::text) AND (pyr_payroll_schedule.end_date >= '2020-03-25'::date))
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(pyr_payroll_schedule.vpd_key, 'PYR_PAYROLL_SCHEDULE'::character varying))
Planning time : 2.687 ms
Execution time : 0.265 ms