explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8Hok

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 705,435.394 ↓ 0.0 0 1

Sort (cost=196,838.44..196,892.88 rows=21,774 width=210) (actual time=705,435.394..705,435.394 rows=0 loops=1)

  • Sort Key: ((ui.firstname)::character varying(50)) COLLATE "en_US", ((ui.lastname)::character varying(50)) COLLATE "en_US", imeexpensecostbilling2_facts10.timesheetstartdate2, imeexpensecostbilling2_facts10.timesheetenddate3, ((pj.code)::character varying (...)
  • Sort Method: quicksort Memory: 25kB
2.          

CTE eexpensecostbilling2_facts0cte

3. 0.058 705,435.379 ↓ 0.0 0 1

HashAggregate (cost=193,306.84..193,524.58 rows=21,774 width=36) (actual time=705,435.379..705,435.379 rows=0 loops=1)

  • Group Key: at.userid, ts.startdate, ts.enddate, at.projectid, at.taskid
4. 6,454.062 705,435.321 ↓ 0.0 0 1

Nested Loop (cost=11,116.82..192,980.23 rows=21,774 width=36) (actual time=705,435.321..705,435.321 rows=0 loops=1)

  • Join Filter: (ts_1.id = timesheet5.id)
  • Rows Removed by Join Filter: 22113672
5. 1.635 1.635 ↓ 168.0 168 1

Index Scan using uix2tsuseridstartdate on timesheet timesheet5 (cost=0.29..440.80 rows=1 width=16) (actual time=0.041..1.635 rows=168 loops=1)

  • Index Cond: ((startdate >= '2018-12-16'::date) AND (startdate <= '2018-12-22'::date))
  • Filter: ((enddate >= '2018-12-16'::date) AND (enddate <= '2018-12-22'::date))
6. 14,379.866 698,979.624 ↓ 3.0 131,629 168

Hash Semi Join (cost=11,116.53..191,995.08 rows=43,548 width=52) (actual time=0.565..4,160.593 rows=131,629 loops=168)

  • Hash Cond: (at.projectid = project6.id)
7. 14,553.330 684,598.824 ↓ 1.5 131,629 168

Hash Left Join (cost=5,810.46..185,975.92 rows=87,095 width=52) (actual time=0.558..4,074.993 rows=131,629 loops=168)

  • Hash Cond: ((NULL::integer) = "*SELECT* 1".expenseid)
  • Filter: ((tslist.timesheetstatus = ANY ('{0,1,2,3}'::integer[])) OR ("*SELECT* 1".expensestatus = ANY ('{0,1,2,3}'::integer[])))
8. 16,727.879 670,045.488 ↓ 1.4 131,629 168

Hash Left Join (cost=5,757.65..184,811.84 rows=93,778 width=60) (actual time=0.557..3,988.366 rows=131,629 loops=168)

  • Hash Cond: (ts_1.id = ts.id)
9. 25,744.987 653,250.192 ↓ 1.4 131,629 168

Hash Join (cost=1,118.99..178,904.88 rows=93,778 width=48) (actual time=0.155..3,888.394 rows=131,629 loops=168)

  • Hash Cond: (at.userid = ui_1.id)
10. 27,024.984 627,504.864 ↓ 1.4 363,456 168

Append (cost=1,099.02..174,407.72 rows=257,412 width=2,224) (actual time=0.137..3,735.148 rows=363,456 loops=168)

11. 21,299.040 226,491.384 ↑ 1.0 190,941 168

Result (cost=1,099.02..85,779.89 rows=191,127 width=2,896) (actual time=0.137..1,348.163 rows=190,941 loops=168)

12. 13,720.728 205,192.344 ↑ 1.0 190,941 168

Append (cost=1,099.02..85,779.89 rows=191,127 width=2,896) (actual time=0.135..1,221.383 rows=190,941 loops=168)

13. 42,155.564 191,471.280 ↑ 1.0 190,941 168

Hash Left Join (cost=1,099.02..83,868.61 rows=191,126 width=2,896) (actual time=0.134..1,139.710 rows=190,941 loops=168)

  • Hash Cond: ((at.projectid = ptm.projectid) AND (at.userid = ptm.userid) AND (at.entrydate = ptma.date))
14.          

Initplan (forHash Left Join)

15. 0.001 0.001 ↑ 690.0 1 1

Seq Scan on projectsysteminformation projectsysteminformation_2 (cost=0.00..16.90 rows=690 width=16) (actual time=0.001..0.001 rows=1 loops=1)

16. 0.001 0.001 ↑ 690.0 1 1

Seq Scan on projectsysteminformation projectsysteminformation_3 (cost=0.00..16.90 rows=690 width=16) (actual time=0.001..0.001 rows=1 loops=1)

17. 20,632.410 149,315.712 ↑ 1.0 190,941 168

Hash Left Join (cost=950.46..23,754.19 rows=191,126 width=2,864) (actual time=0.126..888.784 rows=190,941 loops=168)

  • Hash Cond: (at.taskid = tk_1.id)
18. 20,938.167 128,682.624 ↑ 1.0 190,941 168

Hash Left Join (cost=916.93..22,066.34 rows=191,126 width=2,860) (actual time=0.121..765.968 rows=190,941 loops=168)

  • Hash Cond: (at.billingrateid = br.id)
19. 24,226.979 107,744.448 ↑ 1.0 190,941 168

Hash Left Join (cost=915.89..19,746.81 rows=191,126 width=2,726) (actual time=0.119..641.336 rows=190,941 loops=168)

  • Hash Cond: (pbr.id = pbrh.projectbillingrateid)
  • Join Filter: ((at.entrydate >= pbrh.effectivedate) AND (at.entrydate <= pbrh.enddate))
20. 27,139.868 83,516.832 ↑ 1.0 190,941 168

Hash Left Join (cost=883.95..15,877.58 rows=191,126 width=2,731) (actual time=0.114..497.124 rows=190,941 loops=168)

  • Hash Cond: ((at.projectid = pbr.projectid) AND (at.billingrateid = pbr.billingrateid))
  • Join Filter: (((pbr.billingrateid = $7) AND (at.userid = pbr.userid)) OR ((pbr.billingrateid <> $8) AND (pbr.userid IS NULL)))
  • Rows Removed by Join Filter: 3
21. 19,857.428 56,376.264 ↑ 1.0 190,941 168

Hash Left Join (cost=849.53..11,418.27 rows=191,126 width=2,715) (actual time=0.109..335.573 rows=190,941 loops=168)

  • Hash Cond: (at.projectid = pj_1.id)
22. 23,992.860 36,518.496 ↑ 1.0 190,941 168

Hash Join (cost=819.70..8,899.41 rows=191,126 width=2,711) (actual time=0.105..217.372 rows=190,941 loops=168)

  • Hash Cond: (at.timesheetid = ts_1.id)
23. 12,508.944 12,508.944 ↑ 1.0 190,941 168

Seq Scan on dm_projecttimeallocation_facts at (cost=0.00..5,451.73 rows=191,126 width=2,699) (actual time=0.003..74.458 rows=190,941 loops=168)

  • Filter: ((timeoffcodeid IS NULL) AND (duration IS NOT NULL))
  • Rows Removed by Filter: 15132
24. 8.224 16.692 ↑ 1.0 24,222 1

Hash (cost=512.09..512.09 rows=24,609 width=28) (actual time=16.692..16.692 rows=24,222 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1676kB
25. 8.468 8.468 ↑ 1.0 24,222 1

Seq Scan on timesheet ts_1 (cost=0.00..512.09 rows=24,609 width=28) (actual time=0.008..8.468 rows=24,222 loops=1)

26. 0.133 0.340 ↑ 1.0 481 1

Hash (cost=23.81..23.81 rows=481 width=8) (actual time=0.340..0.340 rows=481 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
27. 0.207 0.207 ↑ 1.0 481 1

Seq Scan on project pj_1 (cost=0.00..23.81 rows=481 width=8) (actual time=0.003..0.207 rows=481 loops=1)

28. 0.314 0.700 ↓ 1.3 970 1

Hash (cost=23.55..23.55 rows=725 width=40) (actual time=0.700..0.700 rows=970 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 73kB
29. 0.386 0.386 ↓ 1.3 970 1

Seq Scan on projectbillingrate pbr (cost=0.00..23.55 rows=725 width=40) (actual time=0.010..0.386 rows=970 loops=1)

  • Filter: ((billingrateid = $7) OR ((billingrateid <> $8) AND (userid IS NULL)))
30. 0.319 0.637 ↑ 1.0 975 1

Hash (cost=19.75..19.75 rows=975 width=31) (actual time=0.637..0.637 rows=975 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 69kB
31. 0.318 0.318 ↑ 1.0 975 1

Seq Scan on projectbillingratehistory pbrh (cost=0.00..19.75 rows=975 width=31) (actual time=0.008..0.318 rows=975 loops=1)

32. 0.003 0.009 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=134) (actual time=0.009..0.009 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
33. 0.006 0.006 ↑ 1.0 2 1

Seq Scan on billingrate br (cost=0.00..1.02 rows=2 width=134) (actual time=0.005..0.006 rows=2 loops=1)

34. 0.263 0.678 ↑ 1.0 868 1

Hash (cost=22.68..22.68 rows=868 width=8) (actual time=0.678..0.678 rows=868 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 39kB
35. 0.415 0.415 ↑ 1.0 868 1

Seq Scan on task tk_1 (cost=0.00..22.68 rows=868 width=8) (actual time=0.010..0.415 rows=868 loops=1)

36. 0.000 0.002 ↓ 0.0 0 1

Hash (cost=96.91..96.91 rows=1,020 width=44) (actual time=0.002..0.002 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
37. 0.002 0.002 ↓ 0.0 0 1

Hash Join (cost=62.69..96.91 rows=1,020 width=44) (actual time=0.002..0.002 rows=0 loops=1)

  • Hash Cond: (ptma.projectteammemberid = ptm.id)
38. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on projectteammemberallocation ptma (cost=0.00..20.20 rows=1,020 width=52) (actual time=0.000..0.000 rows=0 loops=1)

39. 0.000 0.000 ↓ 0.0 0

Hash (cost=36.75..36.75 rows=2,075 width=24) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Seq Scan on projectteammember ptm (cost=0.00..36.75 rows=2,075 width=24) (never executed)

41. 0.168 0.336 ↓ 0.0 0 168

Subquery Scan on *SELECT* 2_1 (cost=0.00..0.02 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=168)

42. 0.168 0.168 ↓ 0.0 0 168

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=168)

  • One-Time Filter: false
43. 0.168 0.504 ↓ 0.0 0 168

Subquery Scan on *SELECT* 3 (cost=2.21..13.89 rows=1 width=3,315) (actual time=0.003..0.003 rows=0 loops=168)

44. 0.168 0.336 ↓ 0.0 0 168

Nested Loop (cost=2.21..13.88 rows=1 width=3,315) (actual time=0.002..0.002 rows=0 loops=168)

  • Join Filter: (((ee.amount * ee.exchangevalue) * exchangerate_2.exchangevalue) IS NOT NULL)
45.          

Initplan (forNested Loop)

46. 0.000 0.000 ↓ 0.0 0

Seq Scan on systeminformation (cost=0.00..1.01 rows=1 width=4) (never executed)

47. 0.168 0.168 ↓ 0.0 0 168

Hash Join (cost=1.06..12.59 rows=1 width=154) (actual time=0.001..0.001 rows=0 loops=168)

  • Hash Cond: (ex_1.reimbursementcurrencyid = exchangerate_2.fixedcurrencyid)
  • Join Filter: ((ex_1.expensedate >= exchangerate_2.effectivedate) AND (ex_1.expensedate <= exchangerate_2.enddate))
48. 0.000 0.000 ↓ 0.0 0 168

Seq Scan on expense ex_1 (cost=0.00..11.10 rows=110 width=138) (actual time=0.000..0.000 rows=0 loops=168)

49. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.05..1.05 rows=1 width=32) (never executed)

50. 0.000 0.000 ↓ 0.0 0

Seq Scan on exchangerate exchangerate_2 (cost=0.00..1.05 rows=1 width=32) (never executed)

  • Filter: (variablecurrencyid = $5)
51. 0.000 0.000 ↓ 0.0 0

Index Scan using ixeeexpenseid on expenseentry ee (cost=0.14..0.26 rows=1 width=3,165) (never executed)

  • Index Cond: (expenseid = ex_1.id)
52. 0.168 0.336 ↓ 0.0 0 168

Subquery Scan on *SELECT* 4 (cost=0.00..22.69 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=168)

53. 0.168 0.168 ↓ 0.0 0 168

Result (cost=0.00..22.68 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=168)

  • One-Time Filter: false
54. 0.000 0.000 ↓ 0.0 0

Seq Scan on task tsk (cost=0.00..22.68 rows=1 width=8) (never executed)

55. 27,615.504 373,987.656 ↓ 2.6 172,515 168

Subquery Scan on *SELECT* 5 (cost=6,721.25..88,591.25 rows=66,283 width=285) (actual time=0.983..2,226.117 rows=172,515 loops=168)

56. 64,837.246 346,372.152 ↓ 2.6 172,515 168

Nested Loop Left Join (cost=6,721.25..87,928.42 rows=66,283 width=285) (actual time=0.978..2,061.739 rows=172,515 loops=168)

57.          

Initplan (forNested Loop Left Join)

58. 0.002 0.002 ↑ 690.0 1 1

Seq Scan on projectsysteminformation (cost=0.00..16.90 rows=690 width=16) (actual time=0.001..0.002 rows=1 loops=1)

59. 0.000 0.000 ↑ 690.0 1 1

Seq Scan on projectsysteminformation projectsysteminformation_1 (cost=0.00..16.90 rows=690 width=16) (actual time=0.000..0.000 rows=1 loops=1)

60. 18,155.927 194,587.344 ↓ 2.6 172,515 168

Hash Left Join (cost=6,687.03..29,684.67 rows=66,283 width=269) (actual time=0.956..1,158.258 rows=172,515 loops=168)

  • Hash Cond: (bi.id = iibi.billingitemid)
61. 18,300.236 176,431.416 ↓ 2.6 172,515 168

Hash Left Join (cost=6,652.95..29,398.59 rows=66,283 width=253) (actual time=0.955..1,050.187 rows=172,515 loops=168)

  • Hash Cond: (bi.id = aggm.billingitemid)
  • Filter: (aggm.uri IS NULL)
62. 23,424.891 158,131.176 ↓ 1.1 172,515 168

Hash Left Join (cost=6,650.79..28,799.64 rows=159,143 width=253) (actual time=0.953..941.257 rows=172,515 loops=168)

  • Hash Cond: (bidm.timesheetid = t.id)
63. 23,902.278 134,689.968 ↓ 1.1 172,515 168

Hash Left Join (cost=5,831.09..25,832.30 rows=159,143 width=241) (actual time=0.853..801.726 rows=172,515 loops=168)

  • Hash Cond: (pbr_1.id = pbrh_1.projectbillingrateid)
  • Join Filter: ((bi.entrydate >= pbrh_1.effectivedate) AND (bi.entrydate <= pbrh_1.enddate))
64. 27,310.519 110,787.096 ↓ 1.1 172,515 168

Hash Left Join (cost=5,799.15..22,605.20 rows=159,143 width=253) (actual time=0.846..659.447 rows=172,515 loops=168)

  • Hash Cond: ((bidm.projectid = pbr_1.projectid) AND (bidm.billingrateid = pbr_1.billingrateid))
  • Join Filter: (((pbr_1.billingrateid = $2) AND (bidm.userid = pbr_1.userid)) OR ((pbr_1.billingrateid <> $3) AND (pbr_1.userid IS NULL)))
  • Rows Removed by Join Filter: 3
65. 18,629.178 83,475.840 ↓ 1.1 172,515 168

Hash Left Join (cost=5,764.73..18,890.54 rows=159,143 width=253) (actual time=0.837..496.880 rows=172,515 loops=168)

  • Hash Cond: (bidm.billingrateid = br_1.id)
66. 18,604.219 64,846.656 ↓ 1.1 172,515 168

Hash Join (cost=5,763.68..16,961.89 rows=159,143 width=119) (actual time=0.835..385.992 rows=172,515 loops=168)

  • Hash Cond: (bidm.projectid = pj_2.id)
67. 32,886.440 46,242.000 ↓ 1.0 172,515 168

Hash Join (cost=5,733.86..14,696.67 rows=171,725 width=119) (actual time=0.830..275.250 rows=172,515 loops=168)

  • Hash Cond: (bidm.billingitemid = bi.id)
  • Join Filter: (CASE WHEN (bidm.billingtypeuri = 'urn:replicon:billing-item-type:timesheet'::text) THEN bi.amount ELSE 0.0000::numeric(19,4) END IS NOT (...)
68. 13,218.408 13,218.408 ↑ 1.0 206,070 168

Seq Scan on billingitem2denormalizedmetadata bidm (cost=0.00..6,032.70 rows=206,070 width=108) (actual time=0.003..78.681 rows=206,070 loops=168)

  • Filter: (userid IS NOT NULL)
69. 70.425 137.152 ↑ 1.0 172,515 1

Hash (cost=3,576.51..3,576.51 rows=172,588 width=27) (actual time=137.152..137.152 rows=172,515 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 11988kB
70. 66.727 66.727 ↑ 1.0 172,515 1

Seq Scan on billingitem2 bi (cost=0.00..3,576.51 rows=172,588 width=27) (actual time=0.014..66.727 rows=172,515 loops=1)

  • Filter: isbillable
  • Rows Removed by Filter: 33555
71. 0.189 0.437 ↑ 1.0 481 1

Hash (cost=23.81..23.81 rows=481 width=4) (actual time=0.437..0.437 rows=481 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
72. 0.248 0.248 ↑ 1.0 481 1

Seq Scan on project pj_2 (cost=0.00..23.81 rows=481 width=4) (actual time=0.003..0.248 rows=481 loops=1)

73. 0.004 0.006 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=134) (actual time=0.006..0.006 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
74. 0.002 0.002 ↑ 1.0 2 1

Seq Scan on billingrate br_1 (cost=0.00..1.02 rows=2 width=134) (actual time=0.002..0.002 rows=2 loops=1)

75. 0.334 0.737 ↓ 1.3 970 1

Hash (cost=23.55..23.55 rows=725 width=40) (actual time=0.737..0.737 rows=970 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 73kB
76. 0.403 0.403 ↓ 1.3 970 1

Seq Scan on projectbillingrate pbr_1 (cost=0.00..23.55 rows=725 width=40) (actual time=0.015..0.403 rows=970 loops=1)

  • Filter: ((billingrateid = $2) OR ((billingrateid <> $3) AND (userid IS NULL)))
77. 0.295 0.594 ↑ 1.0 975 1

Hash (cost=19.75..19.75 rows=975 width=24) (actual time=0.594..0.594 rows=975 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 62kB
78. 0.299 0.299 ↑ 1.0 975 1

Seq Scan on projectbillingratehistory pbrh_1 (cost=0.00..19.75 rows=975 width=24) (actual time=0.004..0.299 rows=975 loops=1)

79. 8.628 16.317 ↑ 1.0 24,222 1

Hash (cost=512.09..512.09 rows=24,609 width=28) (actual time=16.317..16.317 rows=24,222 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1676kB
80. 7.689 7.689 ↑ 1.0 24,222 1

Seq Scan on timesheet t (cost=0.00..512.09 rows=24,609 width=28) (actual time=0.005..7.689 rows=24,222 loops=1)

81. 0.002 0.004 ↓ 0.0 0 1

Hash (cost=2.15..2.15 rows=1 width=82) (actual time=0.004..0.004 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
82. 0.002 0.002 ↓ 0.0 0 1

Index Scan using ixbiminvoicinghint on billingitem2metadata aggm (cost=0.12..2.15 rows=1 width=82) (actual time=0.002..0.002 rows=0 loops=1)

83. 0.000 0.001 ↓ 0.0 0 1

Hash (cost=20.70..20.70 rows=1,070 width=32) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 16kB
84. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on invoiceitembillingitems iibi (cost=0.00..20.70 rows=1,070 width=32) (actual time=0.001..0.001 rows=0 loops=1)

85. 86,947.560 86,947.560 ↑ 1.0 1 28,982,520

Index Scan using ixbimbillingitemidkey on billingitem2metadata bi2m (cost=0.42..0.85 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=28,982,520)

  • Index Cond: (billingitemid = bi.id)
86. 0.035 0.341 ↑ 1.0 98 1

Hash (cost=18.74..18.74 rows=98 width=8) (actual time=0.341..0.341 rows=98 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
87. 0.038 0.306 ↑ 1.0 98 1

Nested Loop (cost=6.00..18.74 rows=98 width=8) (actual time=0.095..0.306 rows=98 loops=1)

88. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on departments dep (cost=0.00..1.07 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=1)

  • Filter: (id = 2)
  • Rows Removed by Filter: 5
89. 0.099 0.259 ↑ 1.0 98 1

Hash Join (cost=6.00..16.68 rows=98 width=12) (actual time=0.085..0.259 rows=98 loops=1)

  • Hash Cond: (ui_1.id = du.userid)
90. 0.083 0.083 ↑ 1.0 269 1

Seq Scan on userinfo ui_1 (cost=0.00..8.69 rows=269 width=4) (actual time=0.002..0.083 rows=269 loops=1)

91. 0.029 0.077 ↑ 1.0 98 1

Hash (cost=4.78..4.78 rows=98 width=8) (actual time=0.077..0.077 rows=98 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
92. 0.048 0.048 ↑ 1.0 98 1

Index Only Scan using departmentusers_pkey on departmentusers du (cost=0.15..4.78 rows=98 width=8) (actual time=0.013..0.048 rows=98 loops=1)

  • Index Cond: (departmentid = 2)
  • Heap Fetches: 98
93. 9.523 67.417 ↓ 1.0 24,222 1

Hash (cost=4,337.99..4,337.99 rows=24,054 width=28) (actual time=67.417..67.417 rows=24,222 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1676kB
94. 22.763 57.894 ↓ 1.0 24,222 1

Hash Join (cost=819.70..4,337.99 rows=24,054 width=28) (actual time=14.847..57.894 rows=24,222 loops=1)

  • Hash Cond: (tslist.timesheetid = ts.id)
95. 20.337 20.337 ↓ 1.0 24,222 1

Seq Scan on dm_timesheetlist_facts tslist (cost=0.00..3,187.54 rows=24,054 width=20) (actual time=0.007..20.337 rows=24,222 loops=1)

96. 7.871 14.794 ↑ 1.0 24,222 1

Hash (cost=512.09..512.09 rows=24,609 width=24) (actual time=14.794..14.794 rows=24,222 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1581kB
97. 6.923 6.923 ↑ 1.0 24,222 1

Seq Scan on timesheet ts (cost=0.00..512.09 rows=24,609 width=24) (actual time=0.003..6.923 rows=24,222 loops=1)

98. 0.000 0.006 ↓ 0.0 0 1

Hash (cost=51.80..51.80 rows=81 width=8) (actual time=0.006..0.006 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
99. 0.005 0.006 ↓ 0.0 0 1

Hash Join (cost=26.07..51.80 rows=81 width=8) (actual time=0.006..0.006 rows=0 loops=1)

  • Hash Cond: ("*SELECT* 1".expenseid = ex.id)
100. 0.000 0.000 ↓ 0.0 0

Append (cost=13.60..38.21 rows=81 width=8) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 1 (cost=13.60..25.81 rows=1 width=8) (never executed)

102. 0.000 0.000 ↓ 0.0 0

Hash Anti Join (cost=13.60..25.80 rows=1 width=8) (never executed)

  • Hash Cond: (dm_expenselist_facts.expenseid = dm_expenselist_realtime_facts.expenseid)
103. 0.000 0.000 ↓ 0.0 0

Seq Scan on dm_expenselist_facts (cost=0.00..11.60 rows=160 width=8) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Hash (cost=11.60..11.60 rows=160 width=4) (never executed)

105. 0.000 0.000 ↓ 0.0 0

Seq Scan on dm_expenselist_realtime_facts (cost=0.00..11.60 rows=160 width=4) (never executed)

106. 0.000 0.000 ↓ 0.0 0

Subquery Scan on *SELECT* 2 (cost=0.00..12.40 rows=80 width=8) (never executed)

107. 0.000 0.000 ↓ 0.0 0

Seq Scan on dm_expenselist_realtime_facts dm_expenselist_realtime_facts_1 (cost=0.00..11.60 rows=80 width=8) (never executed)

  • Filter: (NOT deleted)
108. 0.000 0.001 ↓ 0.0 0 1

Hash (cost=11.10..11.10 rows=110 width=4) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
109. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on expense ex (cost=0.00..11.10 rows=110 width=4) (actual time=0.001..0.001 rows=0 loops=1)

110. 0.127 0.934 ↑ 2.4 481 1

Hash (cost=5,291.69..5,291.69 rows=1,150 width=4) (actual time=0.934..0.934 rows=481 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 33kB
111. 0.459 0.807 ↑ 2.4 481 1

Merge Left Join (cost=0.43..5,291.69 rows=1,150 width=4) (actual time=0.328..0.807 rows=481 loops=1)

  • Merge Cond: (project6.id = projectsharingassignment7.projectid)
  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (project6.projectleaderapproverid = 187) OR (projectsharingassignment7.userid = 187))
112. 0.210 0.210 ↑ 1.0 481 1

Index Scan using project_pkey on project project6 (cost=0.27..30.49 rows=481 width=8) (actual time=0.010..0.210 rows=481 loops=1)

113. 0.001 0.001 ↓ 0.0 0 1

Index Only Scan using projectsharingassignment_pkey on projectsharingassignment projectsharingassignment7 (cost=0.15..45.06 rows=2,260 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Heap Fetches: 0
114.          

SubPlan (forMerge Left Join)

115. 0.000 0.000 ↓ 0.0 0

Index Only Scan using project_pkey on project project8 (cost=0.27..2.29 rows=1 width=0) (never executed)

  • Index Cond: (id = project6.id)
  • Heap Fetches: 0
116. 0.137 0.137 ↑ 1.0 481 1

Seq Scan on project project8_1 (cost=0.00..23.81 rows=481 width=4) (actual time=0.003..0.137 rows=481 loops=1)

117.          

Initplan (forSort)

118. 0.000 0.000 ↓ 0.0 0

Seq Scan on systeminformation systeminformation_1 (cost=0.00..1.01 rows=1 width=4) (never executed)

119. 0.000 0.000 ↓ 0.0 0

Seq Scan on systeminformation systeminformation_2 (cost=0.00..1.01 rows=1 width=4) (never executed)

120. 0.000 0.000 ↓ 0.0 0

Seq Scan on systeminformation systeminformation_3 (cost=0.00..1.01 rows=1 width=4) (never executed)

121. 0.001 705,435.384 ↓ 0.0 0 1

Hash Left Join (cost=106.96..1,741.98 rows=21,774 width=210) (actual time=705,435.384..705,435.384 rows=0 loops=1)

  • Hash Cond: (ui.id = uprh.userid)
122. 0.001 705,435.383 ↓ 0.0 0 1

Hash Left Join (cost=81.56..1,499.05 rows=21,774 width=184) (actual time=705,435.383..705,435.383 rows=0 loops=1)

  • Hash Cond: (($11) = currencyinfo13.id)
123. 0.000 705,435.382 ↓ 0.0 0 1

Hash Left Join (cost=80.51..1,414.17 rows=21,774 width=70) (actual time=705,435.382..705,435.382 rows=0 loops=1)

  • Hash Cond: (imeexpensecostbilling2_facts10.projectid4 = pj.id)
124. 0.001 705,435.382 ↓ 0.0 0 1

Hash Left Join (cost=50.69..1,084.96 rows=21,774 width=64) (actual time=705,435.382..705,435.382 rows=0 loops=1)

  • Hash Cond: (imeexpensecostbilling2_facts10.userid1 = ui.id)
125. 0.000 705,435.381 ↓ 0.0 0 1

Hash Left Join (cost=38.64..773.51 rows=21,774 width=43) (actual time=705,435.381..705,435.381 rows=0 loops=1)

  • Hash Cond: (imeexpensecostbilling2_facts10.taskid5 = tk.id)
126. 705,435.381 705,435.381 ↓ 0.0 0 1

CTE Scan on eexpensecostbilling2_facts0cte imeexpensecostbilling2_facts10 (cost=0.00..435.48 rows=21,774 width=36) (actual time=705,435.381..705,435.381 rows=0 loops=1)

127. 0.000 0.000 ↓ 0.0 0

Hash (cost=27.79..27.79 rows=868 width=11) (never executed)

128. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=1.12..27.79 rows=868 width=11) (never executed)

  • Hash Cond: (tk.estimatedcostcurrencyid = exchangerate.fixedcurrencyid)
129. 0.000 0.000 ↓ 0.0 0

Seq Scan on task tk (cost=0.00..22.68 rows=868 width=15) (never executed)

130. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.11..1.11 rows=1 width=4) (never executed)

131. 0.000 0.000 ↓ 0.0 0

Seq Scan on exchangerate (cost=0.00..1.11 rows=1 width=4) (never executed)

  • Filter: ((variablecurrencyid = $10) AND (('now'::cstring)::date >= effectivedate) AND (('now'::cstring)::date <= enddate))
132. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.69..8.69 rows=269 width=21) (never executed)

133. 0.000 0.000 ↓ 0.0 0

Seq Scan on userinfo ui (cost=0.00..8.69 rows=269 width=21) (never executed)

134. 0.000 0.000 ↓ 0.0 0

Hash (cost=23.81..23.81 rows=481 width=10) (never executed)

135. 0.000 0.000 ↓ 0.0 0

Seq Scan on project pj (cost=0.00..23.81 rows=481 width=10) (never executed)

136. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.02..1.02 rows=2 width=122) (never executed)

137. 0.000 0.000 ↓ 0.0 0

Seq Scan on currencyinfo currencyinfo13 (cost=0.00..1.02 rows=2 width=122) (never executed)

138. 0.000 0.000 ↓ 0.0 0

Hash (cost=24.56..24.56 rows=67 width=30) (never executed)

139. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.41..24.56 rows=67 width=30) (never executed)

  • Hash Cond: (uprh.currencyid = exchangerate_1.fixedcurrencyid)
140. 0.000 0.000 ↓ 0.0 0

Index Scan using ix3uprh_userideffdateenddate on userpayrollratehistory uprh (cost=0.29..21.76 rows=269 width=14) (never executed)

  • Index Cond: ((('now'::cstring)::date >= effectivedate) AND (('now'::cstring)::date <= enddate))
141. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.11..1.11 rows=1 width=24) (never executed)

142. 0.000 0.000 ↓ 0.0 0

Seq Scan on exchangerate exchangerate_1 (cost=0.00..1.11 rows=1 width=24) (never executed)

  • Filter: ((variablecurrencyid = $12) AND (('now'::cstring)::date >= effectivedate) AND (('now'::cstring)::date <= enddate))