explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6S6W

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 66,198.089 ↓ 0.0 0 1

Nested Loop (cost=2.54..51,668.64 rows=1 width=4) (actual time=66,198.089..66,198.089 rows=0 loops=1)

  • Output: userinfo0.id
  • Buffers: shared hit=922658 read=96
2. 0.002 66,198.089 ↓ 0.0 0 1

Nested Loop Semi Join (cost=2.26..51,666.33 rows=1 width=4) (actual time=66,198.089..66,198.089 rows=0 loops=1)

  • Output: userinfo0.id
  • Buffers: shared hit=922658 read=96
3. 0.027 0.027 ↑ 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.026..0.027 rows=1 loops=1)

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

Nested Loop Semi Join (cost=1.98..51,664.02 rows=1 width=4) (actual time=66,198.060..66,198.060 rows=0 loops=1)

  • Output: userinfo2.id
  • Buffers: shared hit=922654 read=96
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.165 66,198.052 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1.69..51,661.71 rows=1 width=4) (actual time=66,198.052..66,198.052 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=922650 read=96
7. 0.304 139.202 ↓ 55.0 55 1

Nested Loop (cost=0.84..4.74 rows=1 width=12) (actual time=1.284..139.202 rows=55 loops=1)

  • Output: timepunch3.userid, malizedtimepunchlocaldatetime4.entrydatetime
  • Inner Unique: true
  • Buffers: shared hit=158 read=73
8. 0.188 0.188 ↓ 55.0 55 1

Index Scan using timepunch_useridpunchtimeutc on pikeg3.timepunch timepunch3 (cost=0.42..2.30 rows=1 width=20) (actual time=0.023..0.188 rows=55 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. 138.710 138.710 ↑ 1.0 1 55

Index Scan using denormalizedtimepunchlocaldatetime_facts_pkey on pikeg3.denormalizedtimepunchlocaldatetime malizedtimepunchlocaldatetime4 (cost=0.42..2.44 rows=1 width=24) (actual time=2.522..2.522 rows=1 loops=55)

  • Output: malizedtimepunchlocaldatetime4.timepunchid, malizedtimepunchlocaldatetime4.entrydatetime
  • Index Cond: (malizedtimepunchlocaldatetime4.timepunchid = timepunch3.id)
  • Buffers: shared hit=147 read=73
10. 0.055 66,058.685 ↓ 0.0 0 55

Nested Loop (cost=0.85..51,656.94 rows=1 width=12) (actual time=1,201.067..1,201.067 rows=0 loops=55)

  • Output: timesheet5.userid, timesheet5.startdate, timesheet5.enddate
  • Inner Unique: true
  • Buffers: shared hit=922492 read=23
11. 1,439.790 66,058.630 ↓ 0.0 0 55

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

  • 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=922492 read=23
12. 6,627.060 64,618.840 ↓ 1.1 312,239 55

Unique (cost=0.43..47,402.97 rows=282,453 width=72) (actual time=0.014..1,174.888 rows=312,239 loops=55)

  • Output: ta.timesheetid, ta.action, NULL::integer, ta.userid, NULL::text, NULL::timestamp without time zone, ta.serialnumber
  • Buffers: shared hit=922492 read=23
13. 57,991.780 57,991.780 ↑ 1.0 1,227,073 55

Index Scan using ixtah2timesheetid on pikeg3.timesheetapprovalhistory ta (cost=0.43..44,331.04 rows=1,228,774 width=72) (actual time=0.014..1,054.396 rows=1,227,073 loops=55)

  • Output: ta.timesheetid, ta.action, NULL::integer, ta.userid, NULL::text, NULL::timestamp without time zone, ta.serialnumber
  • Buffers: shared hit=922492 read=23
14. 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)
15. 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.675 ms
Execution time : 66,198.202 ms