explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h3wm

Settings
# exclusive inclusive rows x rows loops node
1. 0.261 278.908 ↑ 14.3 113 1

Sort (cost=117,463.56..117,467.61 rows=1,621 width=1,296) (actual time=278.901..278.908 rows=113 loops=1)

  • Sort Key: p.employeeid
  • Sort Method: quicksort Memory: 40kB
  • Buffers: shared hit=32,001
2. 0.144 278.647 ↑ 14.3 113 1

Nested Loop (cost=4.34..117,377.14 rows=1,621 width=1,296) (actual time=78.779..278.647 rows=113 loops=1)

  • Buffers: shared hit=32,001
3. 0.253 273.757 ↑ 12.4 113 1

Nested Loop (cost=4.06..115,012.72 rows=1,396 width=1,304) (actual time=78.746..273.757 rows=113 loops=1)

  • Buffers: shared hit=31,434
4. 94.173 94.173 ↓ 2.5 113 1

Index Scan using timepunch_idx1 on wfm_timepunch tp (cost=0.43..113,529.17 rows=46 width=1,289) (actual time=78.699..94.173 rows=113 loops=1)

  • Index Cond: (tp.punchtime = '2020-06-01 04:00:00'::timestamp without time zone)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all(tp.vpd_key, 'WFM_TIMEPUNCH'::character varying))
  • Buffers: shared hit=20,389
5. 178.088 179.331 ↑ 3.0 1 113

Bitmap Heap Scan on chr_emp_position p (cost=3.63..32.22 rows=3 width=24) (actual time=0.495..1.587 rows=1 loops=113)

  • Filter: ((CURRENT_DATE >= p.eff_date) AND (CURRENT_DATE <= p.eff_date_end) AND (("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(p.vpd_key))
  • Heap Blocks: exact=10,885
  • Buffers: shared hit=11,045
6. 1.243 1.243 ↓ 15.9 127 113

Bitmap Index Scan on chr_emp_position_idx8 (cost=0..3.63 rows=8 width=0) (actual time=0.011..0.011 rows=127 loops=113)

  • Index Cond: ((p.badge)::text = (tp.badge)::text)
  • Buffers: shared hit=160
7. 4.746 4.746 ↑ 1.0 1 113

Index Scan using chr_associate_idx6 on chr_associate chr (cost=0.29..1.68 rows=1 width=8) (actual time=0.018..0.042 rows=1 loops=113)

  • Index Cond: ((chr.userid)::text = (p.userid)::text)
  • Filter: ((("current_user"())::text <> ANY ('{wfmadmin,skipvpd}'::text[])) AND vpd_sec_usr.f_sel_policy_all_static(chr.vpd_key))
  • Buffers: shared hit=567
Planning time : 0.951 ms
Execution time : 279.018 ms