explain.depesz.com

PostgreSQL's explain analyze made readable

Result: twaa

Settings
# exclusive inclusive rows x rows loops node
1. 0.153 8,996.252 ↓ 3.8 23 1

Sort (cost=833,466.21..833,466.23 rows=6 width=369) (actual time=8,996.246..8,996.252 rows=23 loops=1)

  • Sort Key: ((ui.info1)::character varying(255)) COLLATE "en_US", ((login.loginname)::character varying(255)) COLLATE "en_US", ((ui.lastname)::character varying(50)) COLLATE "en_US", ((ui.firstname)::character varying(50)) COLLATE "en_US", ui.duplicatename (...)
  • Sort Method: quicksort Memory: 34kB
  • Buffers: shared hit=175460
2.          

Initplan (forSort)

3. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on systeminformation (cost=0.00..1.01 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=1)

  • Buffers: shared hit=1
4. 0.048 8,996.095 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,867.26..833,465.12 rows=6 width=369) (actual time=8,712.929..8,996.095 rows=23 loops=1)

  • Buffers: shared hit=175460
5. 0.026 8,995.357 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,866.70..833,290.00 rows=6 width=314) (actual time=8,712.882..8,995.357 rows=23 loops=1)

  • Buffers: shared hit=175253
6. 0.029 8,994.526 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,866.14..833,114.93 rows=6 width=243) (actual time=8,712.822..8,994.526 rows=23 loops=1)

  • Buffers: shared hit=175046
7. 0.053 8,994.405 ↓ 3.8 23 1

Hash Join (cost=78,865.57..833,111.01 rows=6 width=230) (actual time=8,712.797..8,994.405 rows=23 loops=1)

  • Hash Cond: (ts.userid = du.userid)
  • Buffers: shared hit=174993
8. 0.033 8,991.750 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,763.15..833,008.51 rows=6 width=229) (actual time=8,710.168..8,991.750 rows=23 loops=1)

  • Buffers: shared hit=174978
9. 0.036 8,991.717 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,763.02..833,007.56 rows=6 width=214) (actual time=8,710.165..8,991.717 rows=23 loops=1)

  • Buffers: shared hit=174978
10. 0.028 8,991.681 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,762.74..833,005.66 rows=6 width=203) (actual time=8,710.161..8,991.681 rows=23 loops=1)

  • Buffers: shared hit=174978
11. 0.063 8,991.607 ↓ 3.8 23 1

Nested Loop Left Join (cost=78,762.46..833,003.77 rows=6 width=203) (actual time=8,710.151..8,991.607 rows=23 loops=1)

  • Buffers: shared hit=174913
12. 388.128 8,991.475 ↓ 3.8 23 1

Hash Join (cost=78,762.18..833,001.39 rows=6 width=192) (actual time=8,710.138..8,991.475 rows=23 loops=1)

  • Hash Cond: (at.timesheetid = ts_1.id)
  • Buffers: shared hit=174844
13. 5,134.048 8,447.862 ↑ 1.0 1,012,180 1

Hash Left Join (cost=49,223.10..789,544.78 rows=1,012,180 width=129) (actual time=1,057.502..8,447.862 rows=1,012,180 loops=1)

  • Hash Cond: (at.projectid = pj_1.id)
  • Join Filter: ((at.entrydate >= pc.effectivedate) AND (at.entrydate <= pc.enddate))
  • Buffers: shared hit=148895
14. 554.377 3,230.367 ↑ 1.0 1,012,180 1

Hash Left Join (cost=47,102.68..238,077.86 rows=1,012,180 width=89) (actual time=973.825..3,230.367 rows=1,012,180 loops=1)

  • Hash Cond: ((at.projectid = pj_2.id) AND (at.userspecifiedclientid = pc_1.clientid))
  • Join Filter: ((at.entrydate >= pc_1.effectivedate) AND (at.entrydate <= pc_1.enddate))
  • Buffers: shared hit=148057
15. 1,142.200 2,664.158 ↑ 1.0 1,012,180 1

Hash Right Join (cost=46,175.61..229,559.42 rows=1,012,180 width=89) (actual time=961.973..2,664.158 rows=1,012,180 loops=1)

  • Hash Cond: (isbillable.factid = at.id)
  • Buffers: shared hit=147394
16. 563.779 563.779 ↓ 1.0 944,195 1

Index Scan using testdba1 on dm_attendancetimeallocation_metadata isbillable (cost=0.56..170,414.47 rows=943,266 width=17) (actual time=0.053..563.779 rows=944,195 loops=1)

  • Index Cond: (upper(key) = 'URN:REPLICON:TIME-ENTRY-METADATA-KEY:IS-BILLABLE'::text)
  • Buffers: shared hit=123993
17. 527.407 958.179 ↑ 1.0 1,012,180 1

Hash (cost=33,522.80..33,522.80 rows=1,012,180 width=88) (actual time=958.179..958.179 rows=1,012,180 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 110996kB
  • Buffers: shared hit=23401
18. 430.772 430.772 ↑ 1.0 1,012,180 1

Seq Scan on dm_attendancetimeallocation_facts at (cost=0.00..33,522.80 rows=1,012,180 width=88) (actual time=0.006..430.772 rows=1,012,180 loops=1)

  • Buffers: shared hit=23401
19. 0.002 11.832 ↓ 0.0 0 1

Hash (cost=927.05..927.05 rows=1 width=16) (actual time=11.832..11.832 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=663
20. 0.001 11.830 ↓ 0.0 0 1

Nested Loop (cost=0.29..927.05 rows=1 width=16) (actual time=11.830..11.830 rows=0 loops=1)

  • Buffers: shared hit=663
21. 11.829 11.829 ↓ 0.0 0 1

Seq Scan on project pj_2 (cost=0.00..924.74 rows=1 width=4) (actual time=11.829..11.829 rows=0 loops=1)

  • Filter: (clientbillingallocationmethod = 1)
  • Rows Removed by Filter: 20939
  • Buffers: shared hit=663
22. 0.000 0.000 ↓ 0.0 0

Index Only Scan using uix4pc_projectclienteffectiveend on projectclient pc_1 (cost=0.29..2.31 rows=1 width=16) (never executed)

  • Index Cond: (projectid = pj_2.id)
  • Heap Fetches: 0
23. 12.265 83.447 ↑ 1.0 20,937 1

Hash (cost=1,858.71..1,858.71 rows=20,937 width=52) (actual time=83.447..83.447 rows=20,937 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1422kB
  • Buffers: shared hit=838
24. 20.984 71.182 ↑ 1.0 20,937 1

Hash Join (cost=646.08..1,858.71 rows=20,937 width=52) (actual time=32.113..71.182 rows=20,937 loops=1)

  • Hash Cond: (pj_1.id = pc.projectid)
  • Buffers: shared hit=838
25. 18.268 18.268 ↑ 1.0 20,939 1

Seq Scan on project pj_1 (cost=0.00..924.74 rows=20,939 width=8) (actual time=0.010..18.268 rows=20,939 loops=1)

  • Filter: (clientbillingallocationmethod = 0)
  • Buffers: shared hit=663
26. 12.443 31.930 ↑ 1.0 20,937 1

Hash (cost=384.37..384.37 rows=20,937 width=48) (actual time=31.930..31.930 rows=20,937 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1340kB
  • Buffers: shared hit=175
27. 19.487 19.487 ↑ 1.0 20,937 1

Seq Scan on projectclient pc (cost=0.00..384.37 rows=20,937 width=48) (actual time=0.018..19.487 rows=20,937 loops=1)

  • Buffers: shared hit=175
28. 0.013 155.485 ↓ 3.0 3 1

Hash (cost=29,539.06..29,539.06 rows=1 width=172) (actual time=155.485..155.485 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=25949
29. 1.524 155.472 ↓ 3.0 3 1

Nested Loop Left Join (cost=2.10..29,539.06 rows=1 width=172) (actual time=2.832..155.472 rows=3 loops=1)

  • Join Filter: (ui.id = userhierarchy13.userid)
  • Rows Removed by Join Filter: 7164
  • Buffers: shared hit=25949
30. 1.602 150.162 ↓ 3.0 3 1

Nested Loop (cost=2.10..29,389.82 rows=1 width=168) (actual time=0.855..150.162 rows=3 loops=1)

  • Join Filter: (ts.userid = login.userid)
  • Rows Removed by Join Filter: 7266
  • Buffers: shared hit=25829
31. 1.655 146.871 ↓ 3.0 3 1

Nested Loop (cost=2.10..29,286.62 rows=1 width=151) (actual time=0.842..146.871 rows=3 loops=1)

  • Join Filter: (ts.userid = ui.id)
  • Rows Removed by Join Filter: 7266
  • Buffers: shared hit=25682
32. 0.009 143.074 ↓ 3.0 3 1

Nested Loop (cost=2.10..29,038.41 rows=1 width=124) (actual time=0.177..143.074 rows=3 loops=1)

  • Buffers: shared hit=25100
33. 0.011 143.059 ↓ 3.0 3 1

Nested Loop (cost=1.68..29,037.95 rows=1 width=104) (actual time=0.174..143.059 rows=3 loops=1)

  • Join Filter: (tslist.timesheetid = ts_1.id)
  • Buffers: shared hit=25088
34. 0.038 143.033 ↓ 3.0 3 1

Nested Loop (cost=1.26..29,037.47 rows=1 width=80) (actual time=0.164..143.033 rows=3 loops=1)

  • Join Filter: (tah.serialnumber > tahls.lastsubmitserialnumber)
  • Rows Removed by Join Filter: 2
  • Buffers: shared hit=25076
  • -> Index Scan using timesheetapprovalhistorylastsubmit_pkey on timesheetapprovalhistorylastsubmit tahls (cost=0.42..0.46 rows=1 width=20) (actual time=0.004 (...)
35. 0.019 142.995 ↓ 5.0 5 1

Nested Loop (cost=0.84..29,037.00 rows=1 width=68) (actual time=0.155..142.995 rows=5 loops=1)

  • Buffers: shared hit=25056
  • Index Cond: (timesheetid = tslist.timesheetid)
  • Buffers: shared hit=20
36. 142.899 142.899 ↓ 7.0 7 1

Index Scan using ixtahaction on timesheetapprovalhistory tah (cost=0.42..29,034.55 rows=1 width=48) (actual time=0.131..142.899 rows=7 loops=1)

  • Index Cond: (action = ANY ('{2,3,6}'::integer[]))
  • Filter: (((systemprocessidentifier IS NULL) OR (systemprocessidentifier <> 'urn:replicon:approval-system-process:timesheet-submit-script-data-and- (...)
  • Rows Removed by Filter: 459240
  • Buffers: shared hit=24922
37. 0.077 0.077 ↑ 1.0 1 7

Index Scan using ixdtslsftimesheetid on dm_timesheetlist_facts tslist (cost=0.42..2.44 rows=1 width=20) (actual time=0.007..0.011 rows=1 loops=7)

  • Index Cond: (timesheetid = tah.timesheetid)
  • Filter: (timesheetstatus = 2)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=134
38. 0.015 0.015 ↑ 1.0 1 3

Index Scan using timesheet_pkey on timesheet ts_1 (cost=0.42..0.46 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: (id = tahls.timesheetid)
  • Buffers: shared hit=12
39. 0.006 0.006 ↑ 1.0 1 3

Index Scan using timesheet_pkey on timesheet ts (cost=0.42..0.46 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=3)

  • Index Cond: (id = ts_1.id)
  • Buffers: shared hit=12
40. 2.142 2.142 ↓ 1.0 2,423 3

Seq Scan on userinfo ui (cost=0.00..218.09 rows=2,409 width=27) (actual time=0.002..0.714 rows=2,423 loops=3)

  • Buffers: shared hit=582
41. 1.689 1.689 ↓ 1.0 2,423 3

Seq Scan on login (cost=0.00..73.09 rows=2,409 width=17) (actual time=0.002..0.563 rows=2,423 loops=3)

  • Buffers: shared hit=147
42. 3.786 3.786 ↓ 1.0 2,389 3

Seq Scan on userhierarchy userhierarchy13 (cost=0.00..119.55 rows=2,376 width=8) (actual time=0.006..1.262 rows=2,389 loops=3)

  • Filter: (('2019-03-12'::date >= startdate) AND ('2019-03-12'::date <= enddate))
  • Rows Removed by Filter: 2927
  • Buffers: shared hit=120
43. 0.069 0.069 ↑ 1.0 1 23

Index Scan using userinfo_pkey on userinfo userinfo2 (cost=0.28..0.39 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=23)

  • Index Cond: (userhierarchy13.supervisorid = id)
  • Buffers: shared hit=69
44. 0.046 0.046 ↑ 1.0 1 23

Index Scan using project_pkey on project pj (cost=0.29..0.31 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=23)

  • Index Cond: (at.projectid = id)
  • Buffers: shared hit=65
45. 0.000 0.000 ↓ 0.0 0 23

Index Scan using userinfo_pkey on userinfo userinfo3 (cost=0.28..0.31 rows=1 width=19) (actual time=0.000..0.000 rows=0 loops=23)

  • Index Cond: (pj.projectleaderapproverid = id)
46. 0.000 0.000 ↓ 0.0 0 23

Index Scan using activities_pkey on activities activities4 (cost=0.13..0.15 rows=1 width=23) (actual time=0.000..0.000 rows=0 loops=23)

  • Index Cond: (at.activityid = id)
47. 0.772 2.602 ↓ 1.0 2,423 1

Hash (cost=72.30..72.30 rows=2,409 width=9) (actual time=2.602..2.602 rows=2,423 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 125kB
  • Buffers: shared hit=15
48. 1.279 1.830 ↓ 1.0 2,423 1

Hash Join (cost=1.09..72.30 rows=2,409 width=9) (actual time=0.023..1.830 rows=2,423 loops=1)

  • Hash Cond: (du.departmentid = dep.id)
  • Buffers: shared hit=15
49. 0.542 0.542 ↓ 1.0 2,423 1

Seq Scan on departmentusers du (cost=0.00..38.09 rows=2,409 width=8) (actual time=0.005..0.542 rows=2,423 loops=1)

  • Buffers: shared hit=14
50. 0.005 0.009 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=9) (actual time=0.009..0.009 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
51. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on departments dep (cost=0.00..1.04 rows=4 width=9) (actual time=0.002..0.004 rows=4 loops=1)

  • Buffers: shared hit=1
52. 0.069 0.092 ↑ 1.0 1 23

Nested Loop Left Join (cost=0.57..0.64 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=23)

  • Buffers: shared hit=53
53. 0.023 0.023 ↑ 1.0 1 23

Index Scan using task_pkey on task tk (cost=0.42..0.46 rows=1 width=21) (actual time=0.001..0.001 rows=1 loops=23)

  • Index Cond: (at.taskid = id)
  • Buffers: shared hit=52
54. 0.000 0.000 ↓ 0.0 0 13

Index Scan using uix3er_currencyideffectivedate on exchangerate (cost=0.14..0.18 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=13)

  • Index Cond: ((variablecurrencyid = $0) AND (tk.estimatedcostcurrencyid = fixedcurrencyid) AND (('now'::cstring)::date >= effectivedate))
  • Filter: (('now'::cstring)::date <= enddate)
55. 0.805 0.805 ↓ 0.0 0 23

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue8 (cost=0.56..29.17 rows=1 width=87) (actual time=0.035..0.035 rows=0 loops=23)

  • Index Cond: (tah.id = timesheetapprovalhistoryid)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-ACTUAL-USER'::text)
  • Rows Removed by Filter: 19
  • Buffers: shared hit=207
56. 0.690 0.690 ↑ 2.0 1 23

Index Scan using ixtahkvtimesheetapprovalhistoryid on timesheetapprovalhistorykeyvalue esheetapprovalhistorykeyvalue9 (cost=0.56..29.17 rows=2 width=87) (actual time=0.030..0.030 rows=1 loops=23)

  • Index Cond: (tah.id = timesheetapprovalhistoryid)
  • Filter: (upper(key) = 'URN:REPLICON:APPROVAL-HISTORICAL-ACTION-DATA-KEY:ACTING-EFFECTIVE-USER'::text)
  • Rows Removed by Filter: 18
  • Buffers: shared hit=207