explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L5Rm

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1,222.297 ↓ 0.0 0 1

Nested Loop (cost=2.54..52,069.06 rows=1 width=4) (actual time=1,222.297..1,222.297 rows=0 loops=1)

  • Output: userinfo0.id
  • Buffers: shared hit=17016
2. 0.001 1,222.296 ↓ 0.0 0 1

Nested Loop Semi Join (cost=2.26..52,066.75 rows=1 width=4) (actual time=1,222.296..1,222.296 rows=0 loops=1)

  • Output: userinfo0.id
  • Buffers: shared hit=17016
3. 0.019 0.019 ↑ 1.0 1 1

Index Only Scan using userinfo_pkey on pikeg3.userinfo userinfo0 (cost=0.28..2.30 rows=1 width=4) (actual time=0.018..0.019 rows=1 loops=1)

  • Output: userinfo0.id
  • Index Cond: (userinfo0.id = 6127)
  • Heap Fetches: 1
  • Buffers: shared hit=4
4. 0.001 1,222.276 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1.98..52,064.44 rows=1 width=4) (actual time=1,222.276..1,222.276 rows=0 loops=1)

  • Output: userinfo2.id
  • Buffers: shared hit=17012
5. 0.007 0.007 ↑ 1.0 1 1

Index Only Scan using userinfo_pkey on pikeg3.userinfo userinfo2 (cost=0.28..2.30 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Output: userinfo2.id
  • Index Cond: (userinfo2.id = 6127)
  • Heap Fetches: 1
  • Buffers: shared hit=4
6. 0.000 1,222.268 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1.69..52,062.12 rows=14 width=4) (actual time=1,222.268..1,222.268 rows=0 loops=1)

  • Output: timepunch3.userid
  • Join Filter: (((timesheet5.startdate + '00:00:00'::time without time zone) <= malizedtimepunchlocaldatetime4.entrydatetime) AND (malizedtimepunchlocaldatetime4.entrydatetime < ((timesheet5.enddate + 1) + '00:00:00'::time without time zone)))
  • Buffers: shared hit=17008
7. 0.038 0.350 ↑ 2.3 56 1

Nested Loop (cost=0.84..416.04 rows=128 width=12) (actual time=0.037..0.350 rows=56 loops=1)

  • Output: timepunch3.userid, malizedtimepunchlocaldatetime4.entrydatetime
  • Inner Unique: true
  • Buffers: shared hit=235
8. 0.088 0.088 ↑ 2.3 56 1

Index Scan using timepunch_useridpunchtimeutc on pikeg3.timepunch timepunch3 (cost=0.42..111.72 rows=128 width=20) (actual time=0.024..0.088 rows=56 loops=1)

  • Output: timepunch3.id, timepunch3.slug, timepunch3.userid, timepunch3.activityid, timepunch3.projectid, timepunch3.taskid, timepunch3.breaktypeid, timepunch3.billingrateid, timepunch3.punchtimeutc, timepunch3.punchaction, timepunch3.isofflinepunch, timepunch3.rawtimepunchid, timepunch3.clientid, timepunch3.isbillable
  • Index Cond: (timepunch3.userid = 6127)
  • Buffers: shared hit=11
9. 0.224 0.224 ↑ 1.0 1 56

Index Scan using denormalizedtimepunchlocaldatetime_facts_pkey on pikeg3.denormalizedtimepunchlocaldatetime malizedtimepunchlocaldatetime4 (cost=0.42..2.38 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=56)

  • Output: malizedtimepunchlocaldatetime4.timepunchid, malizedtimepunchlocaldatetime4.entrydatetime
  • Index Cond: (malizedtimepunchlocaldatetime4.timepunchid = timepunch3.id)
  • Buffers: shared hit=224
10. 0.015 1,221.920 ↓ 0.0 0 56

Materialize (cost=0.85..51,642.89 rows=1 width=12) (actual time=21.820..21.820 rows=0 loops=56)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate
  • Buffers: shared hit=16773
11. 0.001 1,221.905 ↓ 0.0 0 1

Nested Loop (cost=0.85..51,642.88 rows=1 width=12) (actual time=1,221.905..1,221.905 rows=0 loops=1)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate
  • Inner Unique: true
  • Buffers: shared hit=16773
12. 24.983 1,221.904 ↓ 0.0 0 1

Subquery Scan on timesheetlastapprovalaction6 (cost=0.43..51,625.71 rows=7 width=16) (actual time=1,221.904..1,221.904 rows=0 loops=1)

  • Output: timesheetlastapprovalaction6.timesheetid, timesheetlastapprovalaction6.action, timesheetlastapprovalaction6.approvalagenttype, timesheetlastapprovalaction6.userid, timesheetlastapprovalaction6.systemprocessidentifier, timesheetlastapprovalaction6.timestamputc, ta.serialnumber
  • Filter: ((timesheetlastapprovalaction6.action = 4) AND (timesheetlastapprovalaction6.userid = 2593))
  • Rows Removed by Filter: 312239
  • Buffers: shared hit=16773
13. 114.139 1,196.921 ↓ 1.1 312,239 1

Unique (cost=0.43..47,373.21 rows=283,500 width=72) (actual time=0.017..1,196.921 rows=312,239 loops=1)

  • Output: ta.timesheetid, ta.action, NULL::integer, ta.userid, NULL::text, NULL::timestamp without time zone, ta.serialnumber
  • Buffers: shared hit=16773
14. 1,082.782 1,082.782 ↑ 1.0 1,227,073 1

Index Scan using ixtah2timesheetid on pikeg3.timesheetapprovalhistory ta (cost=0.43..44,305.52 rows=1,227,073 width=72) (actual time=0.017..1,082.782 rows=1,227,073 loops=1)

  • Output: ta.timesheetid, ta.action, NULL::integer, ta.userid, NULL::text, NULL::timestamp without time zone, ta.serialnumber
  • Buffers: shared hit=16773
15. 0.000 0.000 ↓ 0.0 0

Index Scan using timesheet_pkey on pikeg3.timesheet timesheet5 (cost=0.42..2.44 rows=1 width=28) (never executed)

  • Output: timesheet5.id, timesheet5.userid, timesheet5.startdate, timesheet5.enddate, timesheet5.approvalstatus, timesheet5.duedate, timesheet5.autosubmitdatetimeutc, timesheet5.lastautosubmitattemptdatetimeutc, timesheet5.createdonutc
  • Index Cond: (timesheet5.id = timesheetlastapprovalaction6.timesheetid)
  • Filter: (timesheet5.userid = 6127)
16. 0.000 0.000 ↓ 0.0 0

Index Only Scan using login_pkey on pikeg3.login login1 (cost=0.28..2.30 rows=1 width=4) (never executed)

  • Output: login1.userid
  • Index Cond: (login1.userid = 6127)
  • Heap Fetches: 0
Planning time : 1.257 ms
Execution time : 1,222.394 ms