explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wqXA

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 6,020.066 ↓ 0.0 0 1

Unique (cost=435,629.69..435,629.7 rows=1 width=6) (actual time=6,020.066..6,020.066 rows=0 loops=1)

  • Buffers: shared hit=46,129
2.          

CTE time_pair_and_card_data

3. 0.001 6,020.058 ↓ 0.0 0 1

Nested Loop (cost=117,054.97..435,452.62 rows=1 width=32) (actual time=6,020.058..6,020.058 rows=0 loops=1)

  • Buffers: shared hit=46,129
4. 5,867.875 6,020.057 ↓ 0.0 0 1

Bitmap Heap Scan on wfm_timepair tp_1 (cost=117,054.55..283,427.27 rows=98,243 width=42) (actual time=6,020.057..6,020.057 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))
  • Heap Blocks: exact=23,017
  • Buffers: shared hit=46,129
5. 152.182 152.182 ↓ 1.3 386,414 1

Bitmap Index Scan on timepair16_idx (cost=0..117,029.98 rows=294,736 width=0) (actual time=152.182..152.182 rows=386,414 loops=1)

  • Index Cond: (tp_1.paydate >= '2020-03-25'::date)
  • Buffers: shared hit=23,112
6. 0.000 0.000 ↓ 0.0 0 0

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

  • Index Cond: (((tc.vpd_key)::text = (tp_1.vpd_key)::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))
7. 0.005 6,020.066 ↓ 0.0 0 1

Sort (cost=177.07..177.08 rows=1 width=6) (actual time=6,020.066..6,020.066 rows=0 loops=1)

  • Sort Key: tp.paydate, pt.payroll_status
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=46,129
8. 0.001 6,020.061 ↓ 0.0 0 1

Nested Loop (cost=0.85..177.06 rows=1 width=6) (actual time=6,020.061..6,020.061 rows=0 loops=1)

  • Buffers: shared hit=46,129
9. 0.000 6,020.060 ↓ 0.0 0 1

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

  • Buffers: shared hit=46,129
10. 6,020.060 6,020.060 ↓ 0.0 0 1

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

  • Buffers: shared hit=46,129
11. 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 = (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))
12. 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 : 1.242 ms
Execution time : 6,020.29 ms