explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 94Vj

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

Unique (cost=199,109.66..199,109.68 rows=1 width=47) (actual time=918.304..918.304 rows=0 loops=1)

  • Buffers: shared hit=21,503
2. 0.005 918.304 ↓ 0.0 0 1

Sort (cost=199,109.66..199,109.66 rows=1 width=47) (actual time=918.304..918.304 rows=0 loops=1)

  • Sort Key: associate.aoid, associate.given_name, associate.family_name, ep.employeeid, pt.payroll_status
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21,503
3. 0.001 918.299 ↓ 0.0 0 1

Nested Loop (cost=91,381.71..199,109.65 rows=1 width=47) (actual time=918.299..918.299 rows=0 loops=1)

  • Buffers: shared hit=21,503
4. 0.000 918.298 ↓ 0.0 0 1

Nested Loop (cost=91,381.28..199,103.39 rows=1 width=53) (actual time=918.298..918.298 rows=0 loops=1)

  • Buffers: shared hit=21,503
5. 0.001 918.298 ↓ 0.0 0 1

Nested Loop (cost=91,381.28..199,099.64 rows=3 width=35) (actual time=918.298..918.298 rows=0 loops=1)

  • Buffers: shared hit=21,503
6. 0.005 918.297 ↓ 0.0 0 1

Hash Join (cost=91,380.99..199,090.86 rows=10 width=25) (actual time=918.297..918.297 rows=0 loops=1)

  • Buffers: shared hit=21,503
7. 851.192 916.460 ↓ 0.0 0 1

Bitmap Heap Scan on wfm_timepair tp (cost=90,224..197,449.23 rows=24,227 width=31) (actual time=916.459..916.46 rows=0 loops=1)

  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(tp.vpd_key, 'WFM_TIMEPAIR'::character varying))
  • Heap Blocks: exact=6,939
  • Buffers: shared hit=21,330
8. 0.002 65.268 ↓ 0.0 0 1

BitmapOr (cost=90,224..90,224 rows=73,070 width=0) (actual time=65.268..65.268 rows=0 loops=1)

  • Buffers: shared hit=14,391
9. 4.924 4.924 ↓ 2.4 75,068 1

Bitmap Index Scan on timepair25_idx (cost=0..829.67 rows=31,324 width=0) (actual time=4.924..4.924 rows=75,068 loops=1)

  • Index Cond: ((tp.intime >= '2020-07-10 00:00:00'::timestamp without time zone) AND (tp.intime < '2020-07-24 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=401
10. 60.342 60.342 ↓ 1.6 66,250 1

Bitmap Index Scan on timepair25_idx (cost=0..89,382.22 rows=41,746 width=0) (actual time=60.342..60.342 rows=66,250 loops=1)

  • Index Cond: ((tp.outtime >= '2020-07-10 00:00:00'::timestamp without time zone) AND (tp.outtime < '2020-07-24 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=13,990
11. 0.017 1.832 ↑ 2.5 28 1

Hash (cost=1,156.11..1,156.11 rows=70 width=8) (actual time=1.831..1.832 rows=28 loops=1)

  • Buffers: shared hit=173
12. 0.013 1.815 ↑ 2.5 28 1

Nested Loop (cost=271.12..1,156.11 rows=70 width=8) (actual time=1.039..1.815 rows=28 loops=1)

  • Buffers: shared hit=173
13. 0.029 1.003 ↓ 2.0 47 1

HashAggregate (cost=270.7..270.93 rows=23 width=7) (actual time=0.995..1.003 rows=47 loops=1)

  • Group Key: (pyr_payroll_schedule.oid)::text
  • Buffers: shared hit=4
14. 0.966 0.974 ↓ 2.0 47 1

Bitmap Heap Scan on pyr_payroll_schedule pyr_payroll_schedule (cost=4.52..270.64 rows=23 width=7) (actual time=0.105..0.974 rows=47 loops=1)

  • 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))
  • Heap Blocks: exact=3
  • Buffers: shared hit=4
15. 0.008 0.008 ↑ 1.2 56 1

Bitmap Index Scan on pyr_payroll_schedule_idx5 (cost=0..4.52 rows=69 width=0) (actual time=0.008..0.008 rows=56 loops=1)

  • Index Cond: ((pyr_payroll_schedule.payroll_cycle_oid)::text = '724489'::text)
  • Buffers: shared hit=1
16. 0.799 0.799 ↑ 3.0 1 47

Index Scan using timecard5_idx on wfm_timecard tc (cost=0.42..38.46 rows=3 width=15) (actual time=0.01..0.017 rows=1 loops=47)

  • Index Cond: ((tc.payrollscheduleoid)::text = (pyr_payroll_schedule.oid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(tc.vpd_key, 'WFM_TIMECARD'::character varying))
  • Buffers: shared hit=169
17. 0.000 0.000 ↓ 0.0 0 0

Index Scan using chr_emp_position_idx13 on chr_emp_position ep (cost=0.29..0.87 rows=1 width=27) (never executed)

  • Index Cond: ((ep.employeeid)::text = (tp.employeeid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(ep.vpd_key))
18. 0.000 0.000 ↓ 0.0 0 0

Index Scan using chr_associate_idx8 on chr_associate associate (cost=0..1.24 rows=1 width=44) (never executed)

  • Index Cond: ((associate.userid)::text = (ep.userid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(associate.vpd_key))
19. 0.000 0.000 ↓ 0.0 0 0

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

  • Index Cond: (pt.timepairoid = tp.objectid)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(pt.vpd_key, 'WFM_PAYROLL'::character varying))
Planning time : 1.919 ms
Execution time : 918.484 ms