explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RA87

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2.806 ↓ 2.0 2 1

Unique (cost=1,647.87..1,647.89 rows=1 width=47) (actual time=2.802..2.806 rows=2 loops=1)

  • Buffers: shared hit=251
2.          

Initplan (for Unique)

3. 0.010 0.010 ↑ 1.0 1 1

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

4. 0.013 2.802 ↓ 9.0 9 1

Sort (cost=1,647.61..1,647.62 rows=1 width=47) (actual time=2.801..2.802 rows=9 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=251
5. 0.013 2.789 ↓ 9.0 9 1

Nested Loop (cost=742.06..1,647.6 rows=1 width=47) (actual time=1.757..2.789 rows=9 loops=1)

  • Buffers: shared hit=251
6. 0.010 2.578 ↓ 9.0 9 1

Nested Loop (cost=741.63..1,638.89 rows=1 width=53) (actual time=1.723..2.578 rows=9 loops=1)

  • Buffers: shared hit=215
7. 0.015 2.460 ↓ 9.0 9 1

Nested Loop (cost=741.63..1,637.64 rows=1 width=35) (actual time=1.705..2.46 rows=9 loops=1)

  • Buffers: shared hit=197
8. 0.024 2.283 ↓ 9.0 9 1

Hash Join (cost=741.34..1,629.32 rows=1 width=25) (actual time=1.669..2.283 rows=9 loops=1)

  • Buffers: shared hit=170
9. 0.034 2.033 ↑ 1.5 46 1

Nested Loop (cost=271.12..1,156.11 rows=70 width=8) (actual time=0.98..2.033 rows=46 loops=1)

  • Buffers: shared hit=162
10. 0.025 0.924 ↓ 1.9 43 1

HashAggregate (cost=270.7..270.93 rows=23 width=7) (actual time=0.917..0.924 rows=43 loops=1)

  • Group Key: (pyr_payroll_schedule.oid)::text
  • Buffers: shared hit=4
11. 0.892 0.899 ↓ 1.9 43 1

Bitmap Heap Scan on pyr_payroll_schedule pyr_payroll_schedule (cost=4.52..270.64 rows=23 width=7) (actual time=0.099..0.899 rows=43 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
12. 0.007 0.007 ↑ 1.5 45 1

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

  • Index Cond: ((pyr_payroll_schedule.payroll_cycle_oid)::text = '533489'::text)
  • Buffers: shared hit=1
13. 1.075 1.075 ↑ 3.0 1 43

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

  • 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=158
14. 0.007 0.226 ↑ 1.8 9 1

Hash (cost=470.02..470.02 rows=16 width=31) (actual time=0.226..0.226 rows=9 loops=1)

  • Buffers: shared hit=8
15. 0.175 0.219 ↑ 1.8 9 1

Bitmap Heap Scan on wfm_timepair tp (cost=272.14..470.02 rows=16 width=31) (actual time=0.07..0.219 rows=9 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=1
  • Buffers: shared hit=8
16. 0.000 0.044 ↓ 0.0 0 1

BitmapOr (cost=272.14..272.14 rows=47 width=0) (actual time=0.044..0.044 rows=0 loops=1)

  • Buffers: shared hit=7
17. 0.026 0.026 ↑ 2.7 9 1

Bitmap Index Scan on timepair3_idx (cost=0..4.73 rows=24 width=0) (actual time=0.026..0.026 rows=9 loops=1)

  • Index Cond: (((tp.vpd_key)::text = ($0)::text) AND (tp.intime >= '2020-03-28 00:00:00'::timestamp without time zone) AND (tp.intime < '2020-04-10 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=3
18. 0.018 0.018 ↑ 2.6 9 1

Bitmap Index Scan on timepair20_idx (cost=0..267.41 rows=23 width=0) (actual time=0.018..0.018 rows=9 loops=1)

  • Index Cond: (((tp.vpd_key)::text = ($0)::text) AND (tp.outtime >= '2020-03-28 00:00:00'::timestamp without time zone) AND (tp.outtime < '2020-04-10 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=4
19. 0.162 0.162 ↑ 1.0 1 9

Index Scan using chr_emp_position_idx13 on chr_emp_position ep (cost=0.29..8.31 rows=1 width=27) (actual time=0.018..0.018 rows=1 loops=9)

  • 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))
  • Buffers: shared hit=27
20. 0.108 0.108 ↑ 1.0 1 9

Index Scan using chr_associate_idx8 on chr_associate associate (cost=0..1.24 rows=1 width=44) (actual time=0.012..0.012 rows=1 loops=9)

  • 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))
  • Buffers: shared hit=18
21. 0.198 0.198 ↑ 1.0 1 9

Index Scan using payroll5_idx on wfm_payroll pt (cost=0.43..8.71 rows=1 width=10) (actual time=0.022..0.022 rows=1 loops=9)

  • 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))
  • Buffers: shared hit=36
Planning time : 2.099 ms
Execution time : 2.972 ms