explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MRXV

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 5,219.695 ↑ 4.3 3 1

Subquery Scan on vw (cost=3,308,542.11..3,308,542.27 rows=13 width=1,845) (actual time=5,219.694..5,219.695 rows=3 loops=1)

  • Output: vw.id, vw.project_id, vw.projectpart_id, vw.activity_id, vw.personhours, vw.machinehours, vw.personcosts, vw.machinecosts, vw.componentcosts, vw.componentcosts_external, vw.customeradr, vw.producedarticle, vw.number, vw.name, vw.description, vw.d (...)
2. 0.025 5,219.692 ↑ 4.3 3 1

Sort (cost=3,308,542.11..3,308,542.14 rows=13 width=1,867) (actual time=5,219.692..5,219.692 rows=3 loops=1)

  • Output: p.id, "*SELECT* 1".project_id, "*SELECT* 1".projectpart_id, "*SELECT* 1".activity_id, "*SELECT* 1".personhours, "*SELECT* 1".machinehours, "*SELECT* 1".personcosts, "*SELECT* 1".machinecosts, "*SELECT* 1".componentcosts, "*SELECT* 1".compon (...)
  • Sort Key: (prep_natural_sort(pp.positionnumber)), pp."position", (prep_natural_sort((act.number)::text))
  • Sort Method: quicksort Memory: 26kB
3. 0.156 5,219.667 ↑ 4.3 3 1

Nested Loop Left Join (cost=1,660,099.23..3,308,541.87 rows=13 width=1,867) (actual time=2,958.896..5,219.667 rows=3 loops=1)

  • Output: p.id, "*SELECT* 1".project_id, "*SELECT* 1".projectpart_id, "*SELECT* 1".activity_id, "*SELECT* 1".personhours, "*SELECT* 1".machinehours, "*SELECT* 1".personcosts, "*SELECT* 1".machinecosts, "*SELECT* 1".componentcosts, "*SELECT* 1". (...)
4. 0.014 5,219.469 ↑ 4.3 3 1

Hash Left Join (cost=1,660,099.09..3,308,532.89 rows=13 width=1,863) (actual time=2,958.839..5,219.469 rows=3 loops=1)

  • Output: "*SELECT* 1".project_id, "*SELECT* 1".projectpart_id, "*SELECT* 1".activity_id, "*SELECT* 1".personhours, "*SELECT* 1".machinehours, "*SELECT* 1".personcosts, "*SELECT* 1".machinecosts, "*SELECT* 1".componentcosts, "*SELECT* 1". (...)
  • Hash Cond: (p.projectgroup_id = pg.id)
5. 0.024 5,219.432 ↑ 4.3 3 1

Hash Left Join (cost=1,660,097.78..3,308,531.42 rows=13 width=1,233) (actual time=2,958.807..5,219.432 rows=3 loops=1)

  • Output: "*SELECT* 1".project_id, "*SELECT* 1".projectpart_id, "*SELECT* 1".activity_id, "*SELECT* 1".personhours, "*SELECT* 1".machinehours, "*SELECT* 1".personcosts, "*SELECT* 1".machinecosts, "*SELECT* 1".componentcosts, "*SELEC (...)
  • Hash Cond: ("*SELECT* 1".activity_id = act.id)
6. 0.012 5,219.363 ↑ 4.3 3 1

Nested Loop Left Join (cost=1,660,089.00..3,308,522.46 rows=13 width=1,211) (actual time=2,958.744..5,219.363 rows=3 loops=1)

  • Output: "*SELECT* 1".project_id, "*SELECT* 1".projectpart_id, "*SELECT* 1".activity_id, "*SELECT* 1".personhours, "*SELECT* 1".machinehours, "*SELECT* 1".personcosts, "*SELECT* 1".machinecosts, "*SELECT* 1".componentcosts, " (...)
7. 0.004 5,219.336 ↑ 4.3 3 1

Nested Loop (cost=1,660,088.71..3,308,414.30 rows=13 width=1,157) (actual time=2,958.727..5,219.336 rows=3 loops=1)

  • Output: "*SELECT* 1".project_id, "*SELECT* 1".projectpart_id, "*SELECT* 1".activity_id, "*SELECT* 1".personhours, "*SELECT* 1".machinehours, "*SELECT* 1".personcosts, "*SELECT* 1".machinecosts, "*SELECT* 1".componentco (...)
8. 0.008 0.086 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.00..23.69 rows=1 width=1,097) (actual time=0.078..0.086 rows=1 loops=1)

  • Output: p.id, p.producedarticle, p.number, p.name, p.description, p.deliverytext, p.propertyname1, p.propertyvalue1, p.propertyname2, p.propertyvalue2, p.propertyname3, p.propertyvalue3, p.propertyname4, p.proper (...)
9. 0.010 0.072 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.86..18.51 rows=1 width=1,097) (actual time=0.066..0.072 rows=1 loops=1)

  • Output: p.id, p.producedarticle, p.number, p.name, p.description, p.deliverytext, p.propertyname1, p.propertyvalue1, p.propertyname2, p.propertyvalue2, p.propertyname3, p.propertyvalue3, p.propertyname4, p. (...)
  • Join Filter: (p.tenant_id = tenant.id)
  • Rows Removed by Join Filter: 3
10. 0.003 0.060 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.86..17.42 rows=1 width=1,097) (actual time=0.057..0.060 rows=1 loops=1)

  • Output: p.id, p.producedarticle, p.number, p.name, p.description, p.deliverytext, p.propertyname1, p.propertyvalue1, p.propertyname2, p.propertyvalue2, p.propertyname3, p.propertyvalue3, p.propertynam (...)
11. 0.005 0.044 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.57..16.61 rows=1 width=1,064) (actual time=0.042..0.044 rows=1 loops=1)

  • Output: p.id, p.producedarticle, p.number, p.name, p.description, p.deliverytext, p.propertyname1, p.propertyvalue1, p.propertyname2, p.propertyvalue2, p.propertyname3, p.propertyvalue3, p.prope (...)
12. 0.012 0.012 ↑ 1.0 1 1

Index Scan using project_pkey on public.project p (cost=0.28..8.30 rows=1 width=1,037) (actual time=0.011..0.012 rows=1 loops=1)

  • Output: p.id, p.createddate, p.deliverydate, p.description, p.modifieddate, p.number, p.recordstatus, p.version, p.workcardcomment, p.costcentre_id, p.createdby_id, p.customer_id, p.modifi (...)
  • Index Cond: (p.id = 6,583)
13. 0.027 0.027 ↑ 1.0 1 1

Index Scan using idx_company_displayname on public.company (cost=0.29..8.30 rows=1 width=35) (actual time=0.026..0.027 rows=1 loops=1)

  • Output: company.id, company.creditorno, company.customer, company.debitorno, company.name, company.number, company.prospective, company.supplier, company.supplierbonusagreements, company.s (...)
  • Index Cond: (company.id = p.customer_id)
14. 0.013 0.013 ↑ 1.0 1 1

Index Scan using address_pkey on public.address adr (cost=0.29..0.80 rows=1 width=41) (actual time=0.012..0.013 rows=1 loops=1)

  • Output: adr.id, adr.addresslines, adr.city, adr.name, adr."position", adr.postcode, adr.company_id, adr.country_id, adr.recordstatus, adr.createddate, adr.modifieddate, adr.createdby_id, adr.mod (...)
  • Index Cond: (company.defaultaddress_id = adr.id)
15. 0.002 0.002 ↑ 1.0 4 1

Seq Scan on public.tenant (cost=0.00..1.04 rows=4 width=8) (actual time=0.002..0.002 rows=4 loops=1)

  • Output: tenant.id, tenant.loginpossible, tenant.name, tenant.number, tenant.region_id, tenant.country_id, tenant.recordstatus, tenant.createddate, tenant.modifieddate, tenant.modifiedby_id, tenant.cre (...)
16. 0.006 0.006 ↑ 1.0 1 1

Index Only Scan using idx_currency_displayname on public.currency curr (cost=0.15..5.17 rows=1 width=8) (actual time=0.004..0.006 rows=1 loops=1)

  • Output: curr.id, curr.isocode3
  • Index Cond: (curr.id = tenant.defaultcurrency_id)
  • Heap Fetches: 1
17. 0.019 5,219.246 ↑ 4.3 3 1

Append (cost=1,660,087.70..3,308,390.48 rows=13 width=60) (actual time=2,958.647..5,219.246 rows=3 loops=1)

18. 0.002 2,958.648 ↑ 6.0 1 1

Subquery Scan on *SELECT* 1 (cost=1,660,087.70..1,660,087.88 rows=6 width=60) (actual time=2,958.647..2,958.648 rows=1 loops=1)

  • Output: "*SELECT* 1".project_id, "*SELECT* 1".projectpart_id, "*SELECT* 1".activity_id, "*SELECT* 1".personhours, "*SELECT* 1".machinehours, "*SELECT* 1".personcosts, "*SELECT* 1".machinecosts, "*SELECT* 1" (...)
19. 0.014 2,958.646 ↑ 6.0 1 1

HashAggregate (cost=1,660,087.70..1,660,087.82 rows=6 width=56) (actual time=2,958.646..2,958.646 rows=1 loops=1)

  • Output: p_1.id, pp_1.id, NULL::integer, roundedsum2((COALESCE(((COALESCE(realdata.personhours, '0'::numeric))::double precision), '0'::double precision))), roundedsum2((COALESCE(((COALESCE(realdata.ma (...)
  • Group Key: p_1.id, pp_1.id, ccosts.sumcosts, ccosts.sumcostsexternal
20. 0.002 2,958.632 ↑ 3.0 2 1

Nested Loop (cost=1,657,642.18..1,660,087.58 rows=6 width=56) (actual time=2,930.206..2,958.632 rows=2 loops=1)

  • Output: p_1.id, pp_1.id, (COALESCE(((COALESCE(realdata.personhours, '0'::numeric))::double precision), '0'::double precision)), (COALESCE(((COALESCE(realdata.machinehours, '0'::numeric))::double (...)
21. 0.005 0.005 ↑ 1.0 1 1

Index Only Scan using project_pkey on public.project p_1 (cost=0.28..8.30 rows=1 width=4) (actual time=0.002..0.005 rows=1 loops=1)

  • Output: p_1.id
  • Index Cond: (p_1.id = 6,583)
  • Heap Fetches: 1
22. 18.059 2,958.625 ↑ 3.0 2 1

Hash Right Join (cost=1,657,641.90..1,660,079.22 rows=6 width=56) (actual time=2,930.202..2,958.625 rows=2 loops=1)

  • Output: pp_1.id, pp_1.project_id, (COALESCE(((COALESCE(realdata.personhours, '0'::numeric))::double precision), '0'::double precision)), (COALESCE(((COALESCE(realdata.machinehours, '0'::nu (...)
  • Hash Cond: ((COALESCE(pp_2.id, realdata.projectpart_id)) = pp_1.id)
23. 173.451 2,264.537 ↓ 2.4 201,243 1

Merge Left Join (cost=1,635,112.94..1,636,414.34 rows=82,608 width=44) (actual time=2,057.048..2,264.537 rows=201,243 loops=1)

  • Output: (nextval('vw_default_seq'::regclass))::integer, NULL::integer, NULL::integer, (COALESCE(pp_2.id, realdata.projectpart_id)), NULL::double precision, NULL::double precision, NU (...)
  • Merge Cond: ((COALESCE(pp_2.id, realdata.projectpart_id)) = sb.projectpart_id)
24. 271.350 2,084.023 ↓ 2.4 201,243 1

Sort (cost=1,633,498.17..1,633,704.69 rows=82,608 width=36) (actual time=2,049.957..2,084.023 rows=201,243 loops=1)

  • Output: (COALESCE(pp_2.id, realdata.projectpart_id)), ((COALESCE(realdata.personhours, '0'::numeric))::double precision), ((COALESCE(realdata.machinehours, '0'::numeric))::doub (...)
  • Sort Key: (COALESCE(pp_2.id, realdata.projectpart_id))
  • Sort Method: external sort Disk: 10,328kB
25. 55.436 1,812.673 ↓ 2.4 201,243 1

Hash Full Join (cost=89,875.69..1,624,490.58 rows=82,608 width=36) (actual time=1,345.297..1,812.673 rows=201,243 loops=1)

  • Output: (COALESCE(pp_2.id, realdata.projectpart_id)), ((COALESCE(realdata.personhours, '0'::numeric))::double precision), ((COALESCE(realdata.machinehours, '0'::numeric)) (...)
  • Hash Cond: ((COALESCE(preplanned.activity_id, pa.task_id, realdata.activity_id)) = act_1.id)
26. 67.239 1,757.209 ↓ 2.4 201,242 1

Hash Full Join (cost=89,866.91..1,623,845.72 rows=82,608 width=40) (actual time=1,345.256..1,757.209 rows=201,242 loops=1)

  • Output: (COALESCE(pp_2.id, realdata.projectpart_id)), ((COALESCE(realdata.personhours, '0'::numeric))::double precision), ((COALESCE(realdata.machinehours, '0'::num (...)
  • Hash Cond: (COALESCE(preplanned.project_id, p_3.id, realdata.project_id) = p_2.id)
27. 275.277 1,663.801 ↓ 2.4 200,301 1

Hash Full Join (cost=87,680.62..1,620,523.57 rows=82,608 width=52) (actual time=1,319.079..1,663.801 rows=200,301 loops=1)

  • Output: preplanned.project_id, p_3.id, realdata.project_id, COALESCE(pp_2.id, realdata.projectpart_id), (COALESCE(realdata.personhours, '0'::numeric))::double (...)
  • Hash Cond: ((p_3.id = realdata.project_id) AND (pp_2.id = realdata.projectpart_id) AND (pa.task_id = realdata.activity_id))
  • Join Filter: (NOT ((pa.finished OR ((p_3.status)::text = 'DONE'::text))))
  • Rows Removed by Join Filter: 71,206
28. 14.857 540.769 ↓ 1.4 116,388 1

Merge Full Join (cost=48,790.73..53,030.97 rows=82,608 width=21) (actual time=471.191..540.769 rows=116,388 loops=1)

  • Output: preplanned.project_id, preplanned.activity_id, p_3.id, pa.task_id, pp_2.id, ((pa.finished OR ((p_3.status)::text = 'DONE'::text)))
  • Merge Cond: ((p_3.id = preplanned.project_id) AND (pp_2.id = preplanned.projectpart_id) AND (pa.task_id = preplanned.activity_id))
29. 34.916 287.083 ↓ 1.0 84,612 1

GroupAggregate (cost=24,098.89..26,164.09 rows=82,608 width=18) (actual time=236.459..287.083 rows=84,612 loops=1)

  • Output: p_3.id, pp_2.id, pa.task_id, NULL::numeric, NULL::bigint, NULL::numeric, NULL::numeric, NULL::numeric, NULL::double precision, NULL::doubl (...)
  • Group Key: p_3.id, pp_2.id, pa.task_id, pa.finished
30. 87.654 252.167 ↓ 1.1 90,130 1

Sort (cost=24,098.89..24,305.41 rows=82,608 width=18) (actual time=236.447..252.167 rows=90,130 loops=1)

  • Output: p_3.id, pp_2.id, pa.task_id, pa.finished, p_3.status
  • Sort Key: p_3.id, pp_2.id, pa.task_id, pa.finished
  • Sort Method: external merge Disk: 2,536kB
31. 20.843 164.513 ↓ 1.1 90,130 1

Hash Join (cost=6,332.79..17,352.30 rows=82,608 width=18) (actual time=37.891..164.513 rows=90,130 loops=1)

  • Output: p_3.id, pp_2.id, pa.task_id, pa.finished, p_3.status
  • Hash Cond: (pp_2.project_id = p_3.id)
32. 106.421 137.083 ↓ 1.1 90,144 1

Hash Join (cost=5,716.31..15,598.89 rows=82,893 width=13) (actual time=31.197..137.083 rows=90,144 loops=1)

  • Output: pa.task_id, pa.finished, pp_2.id, pp_2.project_id
  • Hash Cond: (pa.projectpart_id = pp_2.id)
  • -> Seq Scan on public.projectactivity pa (cost=0.00..8708.36 rows=92,076 width=9) (actual time=0.090..76.633 rows=90,144 loops=1 (...)
  • Output: pa.id, pa.amount, pa.comment, pa.createddate, pa.modifieddate, pa."position", pa.recordstatus, pa.version, pa.crea (...)
  • Filter: ((NOT pa.preliminary) AND (NOT pa.external) AND (pa.recordstatus <> 'X'::recordstatus))
  • Rows Removed by Filter: 112,525
33. 30.662 30.662 ↓ 1.0 72,175 1

Hash (cost=4,815.07..4,815.07 rows=72,099 width=8) (actual time=30.662..30.662 rows=72,175 loops=1)

  • Output: pp_2.id, pp_2.project_id
  • Buckets: 131,072 Batches: 1 Memory Usage: 3,843kB
  • -> Seq Scan on public.projectpart pp_2 (cost=0.00..4815.07 rows=72,099 width=8) (actual time=0.005..19.446 rows=72,175 loo (...)
  • Output: pp_2.id, pp_2.project_id
  • Filter: (pp_2.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 7,911
34. 2.223 6.587 ↑ 1.0 6,288 1

Hash (cost=537.88..537.88 rows=6,288 width=9) (actual time=6.587..6.587 rows=6,288 loops=1)

  • Output: p_3.id, p_3.status
  • Buckets: 8,192 Batches: 1 Memory Usage: 320kB
35. 4.364 4.364 ↑ 1.0 6,288 1

Seq Scan on public.project p_3 (cost=0.00..537.88 rows=6,288 width=9) (actual time=0.012..4.364 rows=6,288 loops=1)

  • Output: p_3.id, p_3.status
36. 18.711 238.829 ↑ 2.3 31,776 1

Sort (cost=24,691.84..24,872.33 rows=72,195 width=12) (actual time=234.726..238.829 rows=31,776 loops=1)

  • Output: preplanned.project_id, preplanned.activity_id, preplanned.projectpart_id
  • Sort Key: preplanned.project_id, preplanned.projectpart_id, preplanned.activity_id
  • Sort Method: quicksort Memory: 2,258kB
37. 2.406 220.118 ↑ 2.3 31,776 1

Subquery Scan on preplanned (cost=17,421.94..18,865.84 rows=72,195 width=12) (actual time=209.047..220.118 rows=31,776 loops=1)

  • Output: preplanned.project_id, preplanned.activity_id, preplanned.projectpart_id
38. 37.034 217.712 ↑ 2.3 31,776 1

HashAggregate (cost=17,421.94..18,143.89 rows=72,195 width=8) (actual time=209.046..217.712 rows=31,776 loops=1)

  • Output: p_4.id, NULL::integer, pa_1.task_id, NULL::numeric, NULL::numeric, NULL::double precision, NULL::double precision
  • Group Key: p_4.id, pa_1.task_id
39. 22.788 180.678 ↓ 1.1 82,347 1

Hash Join (cost=6,332.79..17,060.97 rows=72,195 width=8) (actual time=31.964..180.678 rows=82,347 loops=1)

  • Output: pa_1.task_id, p_4.id
  • Hash Cond: (pp_3.project_id = p_4.id)
40. 126.360 156.125 ↓ 1.1 83,095 1

Hash Join (cost=5,716.31..15,450.87 rows=72,444 width=8) (actual time=30.183..156.125 rows=83,095 loops=1)

  • Output: pa_1.task_id, pp_3.project_id
  • Hash Cond: (pa_1.projectpart_id = pp_3.id)
  • -> Seq Scan on public.projectactivity pa_1 (cost=0.00..8708.36 rows=80,469 width=8) (actual time=0.006..94.772 rows=83,095 (...)
  • Output: pa_1.id, pa_1.amount, pa_1.comment, pa_1.createddate, pa_1.modifieddate, pa_1."position", pa_1.recordstatus, (...)
  • Filter: (pa_1.preliminary AND (NOT pa_1.external) AND (pa_1.recordstatus <> 'X'::recordstatus))
  • Rows Removed by Filter: 119,574
41. 29.765 29.765 ↓ 1.0 72,175 1

Hash (cost=4,815.07..4,815.07 rows=72,099 width=8) (actual time=29.765..29.765 rows=72,175 loops=1)

  • Output: pp_3.id, pp_3.project_id
  • Buckets: 131,072 Batches: 1 Memory Usage: 3,843kB
  • -> Seq Scan on public.projectpart pp_3 (cost=0.00..4815.07 rows=72,099 width=8) (actual time=0.004..19.176 rows=721 (...)
  • Output: pp_3.id, pp_3.project_id
  • Filter: (pp_3.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 7,911
42. 0.639 1.765 ↑ 1.0 6,288 1

Hash (cost=537.88..537.88 rows=6,288 width=4) (actual time=1.765..1.765 rows=6,288 loops=1)

  • Output: p_4.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 286kB
43. 1.126 1.126 ↑ 1.0 6,288 1

Seq Scan on public.project p_4 (cost=0.00..537.88 rows=6,288 width=4) (actual time=0.008..1.126 rows=6,288 loops=1)

  • Output: p_4.id
44. 31.500 847.755 ↓ 1.7 84,366 1

Hash (cost=37,305.70..37,305.70 rows=49,268 width=92) (actual time=847.755..847.755 rows=84,366 loops=1)

  • Output: realdata.project_id, realdata.projectpart_id, realdata.activity_id, realdata.personhours, realdata.machinehours, realdata.personcosts, realdata. (...)
  • Buckets: 32,768 Batches: 2 Memory Usage: 3,252kB
45. 7.732 816.255 ↓ 1.7 84,366 1

Subquery Scan on realdata (cost=34,595.96..37,305.70 rows=49,268 width=92) (actual time=610.616..816.255 rows=84,366 loops=1)

  • Output: realdata.project_id, realdata.projectpart_id, realdata.activity_id, realdata.personhours, realdata.machinehours, realdata.personcosts, rea (...)
46. 129.968 808.523 ↓ 1.7 84,366 1

GroupAggregate (cost=34,595.96..36,813.02 rows=49,268 width=40) (actual time=610.616..808.523 rows=84,366 loops=1)

  • Output: pac.project_id, (COALESCE(pac.projectpart_id, pp_4.id)), pac.activity_id, NULL::boolean, round(((sum(pac.personminutes))::numeric / (...)
  • Group Key: pac.project_id, (COALESCE(pac.projectpart_id, pp_4.id)), pac.activity_id
47. 239.851 678.555 ↓ 4.0 197,072 1

Sort (cost=34,595.96..34,719.13 rows=49,268 width=40) (actual time=610.596..678.555 rows=197,072 loops=1)

  • Output: pac.project_id, (COALESCE(pac.projectpart_id, pp_4.id)), pac.activity_id, pac.personminutes, pac.machineminutes, pac.personcos (...)
  • Sort Key: pac.project_id, (COALESCE(pac.projectpart_id, pp_4.id)), pac.activity_id
  • Sort Method: external merge Disk: 9,592kB
48. 59.725 438.704 ↓ 4.0 197,072 1

Hash Left Join (cost=17,243.37..30,755.93 rows=49,268 width=40) (actual time=128.682..438.704 rows=197,072 loops=1)

  • Output: pac.project_id, COALESCE(pac.projectpart_id, pp_4.id), pac.activity_id, pac.personminutes, pac.machineminutes, pac.perso (...)
  • Hash Cond: (pa_2.projectpart_id = pp_4.id)
49. 251.545 351.035 ↓ 4.0 197,072 1

Hash Left Join (cost=11,527.05..24,411.32 rows=49,268 width=40) (actual time=100.294..351.035 rows=197,072 loops=1)

  • Output: pac.project_id, pac.projectpart_id, pac.activity_id, pac.personminutes, pac.machineminutes, pac.personcosts, pac.m (...)
  • Hash Cond: (pac.projectactivity_id = pa_2.id)
  • -> Seq Scan on public.projectactivityconfirmation pac (cost=0.00..10680.16 rows=49,268 width=40) (actual time=0.035..114. (...)
  • Output: pac.project_id, pac.projectpart_id, pac.activity_id, pac.personminutes, pac.machineminutes, pac.personcosts, (...)
  • Filter: (COALESCE((pac.date <= (get_session_var('calcdate'::character varying))::date), true) AND COALESCE((pac.date (...)
50. 99.490 99.490 ↑ 1.0 202,669 1

Hash (cost=8,201.69..8,201.69 rows=202,669 width=8) (actual time=99.490..99.490 rows=202,669 loops=1)

  • Output: pa_2.id, pa_2.projectpart_id
  • Buckets: 131,072 Batches: 4 Memory Usage: 3,018kB
  • -> Seq Scan on public.projectactivity pa_2 (cost=0.00..8201.69 rows=202,669 width=8) (actual time=0.003..60.224 row (...)
  • Output: pa_2.id, pa_2.projectpart_id
51. 27.944 27.944 ↓ 1.0 72,175 1

Hash (cost=4,815.07..4,815.07 rows=72,099 width=4) (actual time=27.944..27.944 rows=72,175 loops=1)

  • Output: pp_4.id
  • Buckets: 131,072 Batches: 1 Memory Usage: 3,562kB
  • -> Seq Scan on public.projectpart pp_4 (cost=0.00..4815.07 rows=72,099 width=4) (actual time=0.006..17.564 rows=72,175 loo (...)
  • Output: pp_4.id
  • Filter: (pp_4.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 7,911
52. 0.718 26.169 ↑ 1.0 6,288 1

Hash (cost=2,107.69..2,107.69 rows=6,288 width=4) (actual time=26.169..26.169 rows=6,288 loops=1)

  • Output: p_2.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 286kB
53. 1.137 25.451 ↑ 1.0 6,288 1

Hash Left Join (cost=1,483.11..2,107.69 rows=6,288 width=4) (actual time=23.502..25.451 rows=6,288 loops=1)

  • Output: p_2.id
  • Hash Cond: (p_2.id = subq.project_id)
54. 0.823 0.823 ↑ 1.0 6,288 1

Seq Scan on public.project p_2 (cost=0.00..537.88 rows=6,288 width=4) (actual time=0.002..0.823 rows=6,288 loops=1)

  • Output: p_2.id, p_2.createddate, p_2.deliverydate, p_2.description, p_2.modifieddate, p_2.number, p_2.recordstatus, p_2.version, p_2.workcardcomme (...)
55. 0.642 23.491 ↓ 254.1 6,099 1

Hash (cost=1,482.81..1,482.81 rows=24 width=4) (actual time=23.491..23.491 rows=6,099 loops=1)

  • Output: subq.project_id
  • Buckets: 8,192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 279kB
56. 1.054 22.849 ↓ 254.1 6,099 1

Subquery Scan on subq (cost=1,324.95..1,482.81 rows=24 width=4) (actual time=12.460..22.849 rows=6,099 loops=1)

  • Output: subq.project_id
  • Filter: (subq.rank = 1)
  • Rows Removed by Filter: 13,330
57. 8.744 21.795 ↓ 4.0 19,429 1

WindowAgg (cost=1,324.95..1,422.09 rows=4,857 width=12) (actual time=12.457..21.795 rows=19,429 loops=1)

  • Output: projectstatuschange.project_id, NULL::character varying(10), NULL::integer, rank() OVER (?), projectstatuschange.startdate
58. 13.051 13.051 ↓ 4.0 19,429 1

Sort (cost=1,324.95..1,337.10 rows=4,857 width=12) (actual time=12.447..13.051 rows=19,429 loops=1)

  • Output: projectstatuschange.project_id, projectstatuschange.startdate
  • Sort Key: projectstatuschange.project_id, projectstatuschange.startdate DESC
  • Sort Method: quicksort Memory: 1,679kB
  • -> Seq Scan on public.projectstatuschange (cost=0.00..1027.56 rows=4,857 width=12) (actual time=0.038..7.135 rows=19,429 loops=1 (...)
  • Output: projectstatuschange.project_id, projectstatuschange.startdate
  • Filter: ((projectstatuschange.recordstatus <> 'X'::recordstatus) AND COALESCE(((projectstatuschange.startdate)::date <= (g (...)
  • Rows Removed by Filter: 26
59. 0.010 0.028 ↑ 1.0 79 1

Hash (cost=7.79..7.79 rows=79 width=4) (actual time=0.028..0.028 rows=79 loops=1)

  • Output: act_1.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
60. 0.018 0.018 ↑ 1.0 79 1

Seq Scan on public.activity act_1 (cost=0.00..7.79 rows=79 width=4) (actual time=0.004..0.018 rows=79 loops=1)

  • Output: act_1.id
61. 1.135 7.063 ↑ 12,455.0 1 1

Sort (cost=1,614.77..1,645.90 rows=12,455 width=12) (actual time=7.063..7.063 rows=1 loops=1)

  • Output: sb.valuedelta, sb.projectpart_id
  • Sort Key: sb.projectpart_id
  • Sort Method: quicksort Memory: 968kB
62. 5.928 5.928 ↑ 1.0 12,455 1

Seq Scan on public.stockbooking sb (cost=0.00..767.55 rows=12,455 width=12) (actual time=0.011..5.928 rows=12,455 loops=1)

  • Output: sb.valuedelta, sb.projectpart_id
63. 0.005 676.029 ↑ 6.0 1 1

Hash (cost=22,528.89..22,528.89 rows=6 width=24) (actual time=676.029..676.029 rows=1 loops=1)

  • Output: pp_1.id, pp_1.project_id, ccosts.sumcosts, ccosts.sumcostsexternal
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
64. 0.447 676.024 ↑ 6.0 1 1

Merge Left Join (cost=22,527.30..22,528.89 rows=6 width=24) (actual time=676.024..676.024 rows=1 loops=1)

  • Output: pp_1.id, pp_1.project_id, ccosts.sumcosts, ccosts.sumcostsexternal
  • Merge Cond: (pp_1.id = ccosts.projectpart_id)
65. 0.006 0.030 ↑ 6.0 1 1

Sort (cost=10.13..10.14 rows=6 width=8) (actual time=0.029..0.030 rows=1 loops=1)

  • Output: pp_1.id, pp_1.project_id
  • Sort Key: pp_1.id
  • Sort Method: quicksort Memory: 25kB
66. 0.024 0.024 ↑ 6.0 1 1

Index Scan using idx_projectpart_project_id on public.projectpart pp_1 (cost=0.29..10.05 rows=6 width=8) (actual time=0.024..0.024 rows=1 loops=1)

  • Output: pp_1.id, pp_1.project_id
  • Index Cond: (pp_1.project_id = 6,583)
  • Filter: (NOT pp_1.preliminary)
  • Rows Removed by Filter: 1
67. 2.169 675.547 ↓ 24.2 7,512 1

Sort (cost=22,517.17..22,517.94 rows=310 width=20) (actual time=675.204..675.547 rows=7,512 loops=1)

  • Output: ccosts.sumcosts, ccosts.sumcostsexternal, ccosts.projectpart_id
  • Sort Key: ccosts.projectpart_id
  • Sort Method: quicksort Memory: 809kB
68. 0.438 673.378 ↓ 26.3 8,155 1

Subquery Scan on ccosts (cost=22,498.14..22,504.34 rows=310 width=20) (actual time=670.783..673.378 rows=8,155 loops=1)

  • Output: ccosts.sumcosts, ccosts.sumcostsexternal, ccosts.projectpart_id
69. 9.703 672.940 ↓ 26.3 8,155 1

HashAggregate (cost=22,498.14..22,501.24 rows=310 width=332) (actual time=670.782..672.940 rows=8,155 loops=1)

  • Output: p_5.id, pc.projectpart_id, cu.id, cu.name, cu.number, (COALESCE(pc.tenant_id, p_5.tenant_id)), COALESCE(sum((roundedsum2(CASE WHEN (COALESCE((NOT pc.e (...)
  • Group Key: p_5.id, pc.projectpart_id, cu.id, cu.name, cu.number, (COALESCE(pc.tenant_id, p_5.tenant_id))
70. 0.890 663.237 ↓ 6.2 19,206 1

Append (cost=2,888.62..22,405.35 rows=3,093 width=363) (actual time=101.289..663.237 rows=19,206 loops=1)

71. 1.813 605.493 ↓ 6.6 17,856 1

Result (cost=2,888.62..19,257.39 rows=2,716 width=360) (actual time=101.288..605.493 rows=17,856 loops=1)

  • Output: p_5.id, pc.projectpart_id, cu.id, cu.name, cu.number, (COALESCE(pc.tenant_id, p_5.tenant_id)), (roundedsum2(CASE WHEN (COALESCE((NOT pc.ex (...)
72. 0.712 603.680 ↓ 6.6 17,856 1

Append (cost=2,888.62..19,257.39 rows=2,716 width=360) (actual time=101.286..603.680 rows=17,856 loops=1)

73. 0.005 0.027 ↓ 0.0 0 1

HashAggregate (cost=2,888.62..2,930.75 rows=1,685 width=349) (actual time=0.027..0.027 rows=0 loops=1)

  • Output: p_5.id, pc.projectpart_id, cu.id, cu.name, cu.number, (COALESCE(pc.tenant_id, p_5.tenant_id)), roundedsum2(CASE WHEN (COALESCE (...)
  • Group Key: p_5.id, pc.projectpart_id, cu.id, cu.name, cu.number, COALESCE(pc.tenant_id, p_5.tenant_id), pc.orderdate
74. 0.007 0.022 ↓ 0.0 0 1

Hash Right Join (cost=911.40..2,833.86 rows=1,685 width=349) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: p_5.id, pc.projectpart_id, cu.id, cu.name, cu.number, COALESCE(pc.tenant_id, p_5.tenant_id), pc.orderdate, pc.external, (...)
  • Hash Cond: (pc.project_id = p_5.id)
  • Filter: (COALESCE((pc.orderdate <= (get_session_var('calcdate'::character varying))::date), true) AND COALESCE((pc.orderdate >= (...)
75. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on public.projectcomponent pc (cost=305.00..1,923.90 rows=27,037 width=27) (never executed)

  • Output: pc.id, pc.amount, pc.createddate, pc.finisheddimensions, pc.modifieddate, pc.recordstatus, pc.version, pc.article_ (...)
  • Recheck Cond: (pc.recordstatus <> 'X'::recordstatus)
  • Filter: ((NOT pc.preliminary) AND (pc.bookedquantity = '0'::double precision))
76. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_projectcomponent_notpreliminary (cost=0.00..298.24 rows=15,727 width=0) (never executed)

  • Index Cond: (pc.preliminary = false)
77. 0.000 0.015 ↓ 0.0 0 1

Hash (cost=586.75..586.75 rows=1,572 width=326) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: p_5.id, p_5.tenant_id, p_5.number, cu.id, cu.name, cu.number
  • Buckets: 2,048 Batches: 1 Memory Usage: 16kB
78. 0.000 0.015 ↓ 0.0 0 1

Hash Left Join (cost=3.50..586.75 rows=1,572 width=326) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: p_5.id, p_5.tenant_id, p_5.number, cu.id, cu.name, cu.number
  • Hash Cond: (p_5.costunit_id = cu.id)
79. 0.005 0.015 ↓ 0.0 0 1

Hash Join (cost=2.14..579.32 rows=1,572 width=26) (actual time=0.015..0.015 rows=0 loops=1)

  • Output: p_5.id, p_5.tenant_id, p_5.number, p_5.costunit_id
  • Hash Cond: (p_5.tenant_id = t.id)
  • -> Seq Scan on public.project p_5 (cost=0.00..537.88 rows=6,288 width=26) (actual time=0.002..0.002 rows=1 lo (...)
  • Output: p_5.id, p_5.createddate, p_5.deliverydate, p_5.description, p_5.modifieddate, p_5.number, p_5.re (...)
80. 0.000 0.010 ↓ 0.0 0 1

Hash (cost=2.13..2.13 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: t.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
81. 0.010 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.00..2.13 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=1)

  • Output: t.id
  • Join Filter: (t.configuration_id = c.id)
  • -> Seq Scan on public.configuration c (cost=0.00..1.04 rows=1 width=4) (actual time=0.009..0.009 (...)
  • Output: c.id, c.createddate, c.defaultlettertemplate, c.modifieddate, c.number, c.recordstat (...)
  • Filter: ((NOT c.useinvoicesforprojectcalculation) AND (NOT c.onlyusebookedcomponentsforproje (...)
  • Rows Removed by Filter: 4
82. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.tenant t (cost=0.00..1.04 rows=4 width=8) (never executed)

  • Output: t.id, t.loginpossible, t.name, t.number, t.region_id, t.country_id, t.recordstatus, (...)
83. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.16..1.16 rows=16 width=304) (never executed)

  • Output: cu.id, cu.name, cu.number
84. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.costunit cu (cost=0.00..1.16 rows=16 width=304) (never executed)

  • Output: cu.id, cu.name, cu.number
85. 1.248 110.403 ↓ 16.4 11,800 1

Subquery Scan on *SELECT* 2 (cost=3,897.01..3,925.85 rows=721 width=393) (actual time=101.259..110.403 rows=11,800 loops=1)

  • Output: "*SELECT* 2".project_id, "*SELECT* 2".projectpart_id, "*SELECT* 2".costunit_id, "*SELECT* 2".costunit_name, "*SELECT* 2".costu (...)
86. 36.505 109.155 ↓ 16.4 11,800 1

HashAggregate (cost=3,897.01..3,918.64 rows=721 width=393) (actual time=101.257..109.155 rows=11,800 loops=1)

  • Output: COALESCE(pc_1.project_id, p_6.id), pc_1.projectpart_id, cu_1.id, cu_1.name, cu_1.number, (COALESCE(pc_1.tenant_id, p_6.t (...)
  • Group Key: p_6.id, cu_1.id, cu_1.name, cu_1.number, COALESCE(pc_1.tenant_id, p_6.tenant_id), pi.id, pii.positionnumber, pc_1.id
87. 2.529 72.650 ↓ 16.4 11,802 1

Hash Left Join (cost=1,457.89..3,817.70 rows=721 width=393) (actual time=20.158..72.650 rows=11,802 loops=1)

  • Output: cu_1.id, cu_1.name, cu_1.number, COALESCE(pc_1.tenant_id, p_6.tenant_id), p_6.id, pi.id, pii.positionnumber, pc_1. (...)
  • Hash Cond: (p_6.costunit_id = cu_1.id)
88. 29.752 70.111 ↓ 16.4 11,802 1

Nested Loop Left Join (cost=1,456.53..3,813.55 rows=721 width=93) (actual time=20.143..70.111 rows=11,802 loops=1)

  • Output: pi.id, pi.amount, pi.amountshipping, pi.date, pi.number, pii.positionnumber, pii.componentexternal, pii.amou (...)
  • Join Filter: (pois.id IS NULL)
  • Rows Removed by Join Filter: 3
  • Filter: ((pc_1.* IS NULL) OR (pc_1.bookedquantity = '0'::double precision) OR (NOT c_1.ignorepurchaseinvoicesoncompo (...)
  • -> Index Scan using projectcomponent_pkey on public.projectcomponent pc_1 (cost=0.29..0.82 rows=1 width=454) (actu (...)
89. 3.889 40.359 ↓ 16.4 11,802 1

Hash Join (cost=1,456.24..3,212.24 rows=721 width=84) (actual time=20.105..40.359 rows=11,802 loops=1)

  • Output: pi.id, pi.amount, pi.amountshipping, pi.date, pi.number, pii.positionnumber, pii.componentexternal, pi (...)
  • Hash Cond: (COALESCE(pois.project_id, pii.project_id, pi.project_id) = p_6.id)
  • Output: pc_1.tenant_id, pc_1.id, pc_1.project_id, pc_1.projectpart_id, pc_1.external, pc_1.extrawork, pc_1.*, (...)
  • Index Cond: (pc_1.id = pii.projectcomponent_id)
  • Filter: ((NOT pc_1.preliminary) AND (pc_1.recordstatus <> 'X'::recordstatus))
  • Rows Removed by Filter: 0
90. 2.030 31.902 ↓ 4.1 11,964 1

Hash Left Join (cost=857.26..2,595.24 rows=2,885 width=83) (actual time=15.526..31.902 rows=11,964 loops=1)

  • Output: pi.id, pi.amount, pi.amountshipping, pi.date, pi.number, pi.project_id, pii.positionnumber, pii. (...)
  • Hash Cond: (pii.id = pois.purchaseinvoiceitem_id)
91. 14.494 29.864 ↓ 4.1 11,962 1

Hash Join (cost=856.13..2,583.28 rows=2,885 width=71) (actual time=15.507..29.864 rows=11,962 loops=1)

  • Output: pi.id, pi.amount, pi.amountshipping, pi.date, pi.number, pi.project_id, pii.positionnumber (...)
  • Hash Cond: (pii.purchaseinvoice_id = pi.id)
  • -> Seq Scan on public.purchaseinvoiceitem pii (cost=0.00..1653.78 rows=11,871 width=35) (actual t (...)
  • Output: pii.id, pii.description, pii."position", pii.quantity, pii.version, pii.unit_id, pii (...)
  • Filter: ((pii.recordstatus <> 'X'::recordstatus) AND ((pii.status)::text <> ALL ('{ENTRY,CAN (...)
  • Rows Removed by Filter: 177
92. 15.370 15.370 ↓ 4.0 5,008 1

Hash (cost=840.48..840.48 rows=1,252 width=40) (actual time=15.370..15.370 rows=5,008 loops=1)

  • Output: pi.id, pi.amount, pi.amountshipping, pi.date, pi.number, pi.project_id
  • Buckets: 8,192 (originally 2048) Batches: 1 (originally 1) Memory Usage: 422kB
  • -> Seq Scan on public.purchaseinvoice pi (cost=0.00..840.48 rows=1,252 width=40) (actual ti (...)
  • Output: pi.id, pi.amount, pi.amountshipping, pi.date, pi.number, pi.project_id
  • Filter: (((pi.status)::text = 'READY'::text) AND (pi.date >= (COALESCE(get_session_var (...)
  • Rows Removed by Filter: 144
93. 0.008 0.008 ↑ 2.0 3 1

Hash (cost=1.06..1.06 rows=6 width=20) (actual time=0.008..0.008 rows=3 loops=1)

  • Output: pois.amount, pois.purchaseinvoiceitem_id, pois.project_id, pois.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • -> Seq Scan on public.purchaseorderitemsplit pois (cost=0.00..1.06 rows=6 width=20) (actual time (...)
  • Output: pois.amount, pois.purchaseinvoiceitem_id, pois.project_id, pois.id
94. 0.979 4.568 ↓ 4.0 6,288 1

Hash (cost=579.32..579.32 rows=1,572 width=13) (actual time=4.568..4.568 rows=6,288 loops=1)

  • Output: p_6.tenant_id, p_6.id, p_6.costunit_id, c_1.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Buckets: 8,192 (originally 2048) Batches: 1 (originally 1) Memory Usage: 317kB
95. 3.546 3.589 ↓ 4.0 6,288 1

Hash Join (cost=2.14..579.32 rows=1,572 width=13) (actual time=0.049..3.589 rows=6,288 loops=1)

  • Output: p_6.tenant_id, p_6.id, p_6.costunit_id, c_1.ignorepurchaseinvoicesoncomponentswithstockboo (...)
  • Hash Cond: (p_6.tenant_id = t_1.id)
  • -> Seq Scan on public.project p_6 (cost=0.00..537.88 rows=6,288 width=12) (actual time=0.001..0.8 (...)
  • Output: p_6.id, p_6.createddate, p_6.deliverydate, p_6.description, p_6.modifieddate, p_6.nu (...)
96. 0.003 0.043 ↓ 4.0 4 1

Hash (cost=2.13..2.13 rows=1 width=5) (actual time=0.043..0.043 rows=4 loops=1)

  • Output: t_1.id, c_1.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
97. 0.040 0.040 ↓ 4.0 4 1

Nested Loop (cost=0.00..2.13 rows=1 width=5) (actual time=0.015..0.040 rows=4 loops=1)

  • Output: t_1.id, c_1.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Join Filter: (t_1.configuration_id = c_1.id)
  • Rows Removed by Join Filter: 12
  • -> Seq Scan on public.configuration c_1 (cost=0.00..1.04 rows=1 width=5) (actual tim (...)
  • Output: c_1.id, c_1.createddate, c_1.defaultlettertemplate, c_1.modifieddate, c_ (...)
  • Filter: (c_1.useinvoicesforprojectcalculation AND (NOT c_1.onlyusebookedcomponen (...)
  • -> Seq Scan on public.tenant t_1 (cost=0.00..1.04 rows=4 width=8) (actual time=0.000 (...)
  • Output: t_1.id, t_1.loginpossible, t_1.name, t_1.number, t_1.region_id, t_1.coun (...)
98. 0.005 0.010 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=304) (actual time=0.010..0.010 rows=16 loops=1)

  • Output: cu_1.id, cu_1.name, cu_1.number
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
99. 0.005 0.005 ↑ 1.0 16 1

Seq Scan on public.costunit cu_1 (cost=0.00..1.16 rows=16 width=304) (actual time=0.003..0.005 rows=16 loops=1)

  • Output: cu_1.id, cu_1.name, cu_1.number
100. 0.000 0.038 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=2,130.47..2,130.71 rows=6 width=384) (actual time=0.038..0.038 rows=0 loops=1)

  • Output: "*SELECT* 3".project_id, "*SELECT* 3".projectpart_id, "*SELECT* 3".costunit_id, "*SELECT* 3".costunit_name, "*SELECT* 3".costu (...)
101. 0.002 0.038 ↓ 0.0 0 1

HashAggregate (cost=2,130.47..2,130.65 rows=6 width=384) (actual time=0.038..0.038 rows=0 loops=1)

  • Output: COALESCE(pc_2.project_id, p_7.id), pc_2.projectpart_id, cu_2.id, cu_2.name, cu_2.number, (COALESCE(pc_2.tenant_id, p_7.t (...)
  • Group Key: p_7.id, cu_2.id, cu_2.name, cu_2.number, COALESCE(pc_2.tenant_id, p_7.tenant_id), po.id, poi.positionnumber, pc_2.id
102. 0.000 0.036 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.86..2,129.90 rows=6 width=384) (actual time=0.036..0.036 rows=0 loops=1)

  • Output: cu_2.id, cu_2.name, cu_2.number, COALESCE(pc_2.tenant_id, p_7.tenant_id), p_7.id, po.id, poi.positionnumber, pc_2. (...)
  • Join Filter: (cu_2.id = p_7.costunit_id)
103. 0.000 0.036 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.86..2,127.26 rows=6 width=84) (actual time=0.036..0.036 rows=0 loops=1)

  • Output: po.id, po.amount, po.freighttotal, po.date, po.number, poi.positionnumber, poi.amount, pois_1.amount, p_7.te (...)
  • Join Filter: (pois_1.id IS NULL)
  • Filter: ((pc_2.* IS NULL) OR (pc_2.bookedquantity = '0'::double precision) OR (NOT c_2.ignorepurchaseinvoicesoncompo (...)
  • -> Index Scan using projectcomponent_pkey on public.projectcomponent pc_2 (cost=0.29..2.81 rows=1 width=454) (neve (...)
104. 0.001 0.036 ↓ 0.0 0 1

Nested Loop (cost=0.57..2,110.34 rows=6 width=75) (actual time=0.036..0.036 rows=0 loops=1)

  • Output: po.id, po.amount, po.freighttotal, po.date, po.number, poi.positionnumber, poi.amount, poi.projectcomp (...)
  • Join Filter: (t_2.id = p_7.tenant_id)
  • Output: pc_2.tenant_id, pc_2.id, pc_2.project_id, pc_2.projectpart_id, pc_2.external, pc_2.extrawork, pc_2.*, (...)
  • Index Cond: (pc_2.id = poi.projectcomponent_id)
  • Filter: ((NOT pc_2.preliminary) AND (pc_2.recordstatus <> 'X'::recordstatus))
105. 0.000 0.035 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.29..1,894.22 rows=26 width=75) (actual time=0.035..0.035 rows=0 loops=1)

  • Output: po.id, po.amount, po.freighttotal, po.date, po.number, poi.positionnumber, poi.amount, poi.proje (...)
  • Join Filter: (pois_1.purchaseorderitem_id = poi.id)
106. 0.000 0.035 ↓ 0.0 0 1

Nested Loop (cost=0.29..1,890.80 rows=26 width=63) (actual time=0.035..0.035 rows=0 loops=1)

  • Output: po.id, po.amount, po.freighttotal, po.date, po.number, poi.positionnumber, poi.amount, poi (...)
107. 0.035 0.035 ↓ 0.0 0 1

Nested Loop (cost=0.00..2.13 rows=1 width=5) (actual time=0.035..0.035 rows=0 loops=1)

  • Output: t_2.id, c_2.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Join Filter: (t_2.configuration_id = c_2.id)
  • -> Seq Scan on public.configuration c_2 (cost=0.00..1.04 rows=1 width=5) (actual time=0.03 (...)
  • Output: c_2.id, c_2.createddate, c_2.defaultlettertemplate, c_2.modifieddate, c_2.numb (...)
  • Filter: (c_2.useinvoicesforprojectcalculation AND c_2.useinvoicesorordersforprojectcal (...)
  • Rows Removed by Filter: 4
108. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.tenant t_2 (cost=0.00..1.04 rows=4 width=8) (never executed)

  • Output: t_2.id, t_2.loginpossible, t_2.name, t_2.number, t_2.region_id, t_2.country_id (...)
109. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..1,888.41 rows=26 width=58) (never executed)

  • Output: po.id, po.amount, po.freighttotal, po.date, po.number, poi.positionnumber, poi.amoun (...)
  • -> Seq Scan on public.purchaseorder po (cost=0.00..1371.61 rows=83 width=36) (never execut (...)
  • Output: po.id, po.amount, po.number, po.supplier_id, po.currency_id, po.tenant_id, po. (...)
  • Filter: (((po.status)::text = 'READY'::text) AND (po.date >= (COALESCE(get_session_var (...)
  • -> Index Scan using idx_purchaseorderitem_purchaseorder_id on public.purchaseorderitem poi (...)
  • Output: poi.id, poi.confirmeddate, poi.desireddate, poi.billedamount, poi.lastdelivery (...)
  • Index Cond: (poi.purchaseorder_id = po.id)
  • Filter: ((poi.recordstatus <> 'X'::recordstatus) AND ((poi.status)::text <> ALL ('{ENT (...)
110. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.09 rows=6 width=20) (never executed)

  • Output: pois_1.amount, pois_1.purchaseorderitem_id, pois_1.project_id, pois_1.id
  • -> Seq Scan on public.purchaseorderitemsplit pois_1 (cost=0.00..1.06 rows=6 width=20) (never exe (...)
  • Output: pois_1.amount, pois_1.purchaseorderitem_id, pois_1.project_id, pois_1.id
111. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pkey on public.project p_7 (cost=0.28..8.30 rows=1 width=12) (never executed)

  • Output: p_7.id, p_7.createddate, p_7.deliverydate, p_7.description, p_7.modifieddate, p_7.number, p_7.re (...)
  • Index Cond: (p_7.id = COALESCE(pois_1.project_id, poi.project_id))
112. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.24 rows=16 width=304) (never executed)

  • Output: cu_2.id, cu_2.name, cu_2.number
113. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.costunit cu_2 (cost=0.00..1.16 rows=16 width=304) (never executed)

  • Output: cu_2.id, cu_2.name, cu_2.number
114. 0.501 490.784 ↓ 6,056.0 6,056 1

Subquery Scan on *SELECT* 4 (cost=5,656.97..5,656.99 rows=1 width=342) (actual time=487.777..490.784 rows=6,056 loops=1)

  • Output: "*SELECT* 4".project_id, "*SELECT* 4".projectpart_id, "*SELECT* 4".costunit_id, "*SELECT* 4".costunit_name, "*SELECT* 4".costu (...)
115. 8.866 490.283 ↓ 6,056.0 6,056 1

HashAggregate (cost=5,656.97..5,656.98 rows=1 width=342) (actual time=487.775..490.283 rows=6,056 loops=1)

  • Output: pc_3.project_id, pc_3.projectpart_id, cu_3.id, cu_3.name, cu_3.number, pc_3.tenant_id, CASE WHEN (NOT pc_3.external) THE (...)
  • Group Key: pc_3.id, cu_3.id, p_8.id, pa_3.id
116. 88.348 481.417 ↓ 6,056.0 6,056 1

Nested Loop (cost=3,972.33..5,656.96 rows=1 width=342) (actual time=39.870..481.417 rows=6,056 loops=1)

  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.external, pc_3.amount, pc_3.extrawork, pc_3.or (...)
  • Join Filter: (CASE WHEN c_3.useinvoicesorordersforprojectcalculation THEN (poi_1.id IS NULL) ELSE true END AND (t_3.config (...)
  • Rows Removed by Join Filter: 9,533
117. 26.349 221.590 ↓ 15,589.0 15,589 1

Nested Loop (cost=3,972.33..5,655.91 rows=1 width=350) (actual time=39.840..221.590 rows=15,589 loops=1)

  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.external, pc_3.amount, pc_3.extrawork, p (...)
  • -> Index Scan using idx_tenant_displayname on public.tenant t_3 (cost=0.13..0.15 rows=1 width=8) (actual time=0.00 (...)
118. 195.241 195.241 ↓ 15,589.0 15,589 1

Nested Loop Left Join (cost=3,972.20..5,655.75 rows=1 width=350) (actual time=39.834..195.241 rows=15,589 loops=1)

  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.external, pc_3.amount, pc_3.extraw (...)
  • -> Nested Loop Left Join (cost=3,971.78..5652.39 rows=1 width=350) (actual time=39.822..129.257 rows=15,589 lo (...)
  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.external, pc_3.amount, pc_3. (...)
  • -> Nested Loop (cost=3,971.65..5652.22 rows=1 width=50) (actual time=39.815..120.357 rows=15,589 loops=1 (...)
  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.external, pc_3.amount, (...)
  • -> Hash Right Join (cost=3,971.37..5651.62 rows=1 width=38) (actual time=39.801..71.456 rows=1,559 (...)
  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.external, pc_3.a (...)
  • Hash Cond: (poi_1.projectcomponent_id = pc_3.id)
  • -> Seq Scan on public.purchaseorderitem poi_1 (cost=0.00..1632.32 rows=12,781 width=8) (act (...)
  • Output: poi_1.id, poi_1.confirmeddate, poi_1.desireddate, poi_1.billedamount, poi_1.la (...)
  • Filter: (((poi_1.status)::text <> ALL ('{ENTRY,CANCELLED}'::text[])) AND (poi_1.record (...)
  • Rows Removed by Filter: 805
  • -> Hash (cost=3,971.35..3971.35 rows=1 width=34) (actual time=39.506..39.506 rows=15,590 loo (...)
  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.external, (...)
  • Buckets: 16,384 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1,301kB
  • -> Hash Right Join (cost=2,317.86..3971.35 rows=1 width=34) (actual time=32.889..36.2 (...)
  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_3.exte (...)
  • Hash Cond: (pii_1.projectcomponent_id = pc_3.id)
  • Filter: (pii_1.id IS NULL)
  • Rows Removed by Filter: 11,470
  • -> Seq Scan on public.purchaseinvoiceitem pii_1 (cost=0.00..1593.09 rows=11,871 (...)
  • Output: pii_1.id, pii_1.description, pii_1."position", pii_1.quantity, pii (...)
  • Filter: (((pii_1.status)::text <> ALL ('{ENTRY,CANCELLED}'::text[])) AND ( (...)
  • Rows Removed by Filter: 177
  • -> Hash (cost=2,233.37..2233.37 rows=6,759 width=34) (actual time=24.458..24.458 (...)
  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_id, pc_ (...)
  • Buckets: 32,768 (originally 8192) Batches: 1 (originally 1) Memory Usage: (...)
  • -> Bitmap Heap Scan on public.projectcomponent pc_3 (cost=299.93..2233.3 (...)
  • Output: pc_3.id, pc_3.project_id, pc_3.projectpart_id, pc_3.tenant_i (...)
  • Recheck Cond: (pc_3.recordstatus <> 'X'::recordstatus)
  • Filter: ((NOT pc_3.preliminary) AND (pc_3.bookedquantity = '0'::doub (...)
  • Heap Blocks: exact=1,326
  • -> Bitmap Index Scan on idx_projectcomponent_notpreliminary (cost= (...)
  • Index Cond: (pc_3.preliminary = false)
  • -> Index Scan using project_pkey on public.project p_8 (cost=0.28..0.59 rows=1 width=12) (actual (...)
  • Output: p_8.id, p_8.createddate, p_8.deliverydate, p_8.description, p_8.modifieddate, p_8.nu (...)
  • Index Cond: (p_8.id = pc_3.project_id)
  • -> Index Scan using idx_costunit_displayname on public.costunit cu_3 (cost=0.14..0.15 rows=1 width=304 (...)
  • Output: cu_3.id, cu_3.createddate, cu_3.description, cu_3.modifieddate, cu_3.name, cu_3.number, cu (...)
  • Index Cond: (cu_3.id = p_8.costunit_id)
  • -> Index Only Scan using projectactivity_pkey on public.projectactivity pa_3 (cost=0.42..3.35 rows=1 width=4 (...)
  • Output: pa_3.id
  • Index Cond: (pa_3.id = pc_3.projectactivity_id)
  • Heap Fetches: 10,471
  • Output: t_3.id, t_3.loginpossible, t_3.name, t_3.number, t_3.region_id, t_3.country_id, t_3.recordstatus, t_3. (...)
  • Index Cond: (t_3.id = p_8.tenant_id)
119. 171.479 171.479 ↑ 1.0 1 15,589

Seq Scan on public.configuration c_3 (cost=0.00..1.04 rows=1 width=5) (actual time=0.009..0.011 rows=1 loops=15,589)

  • Output: c_3.id, c_3.createddate, c_3.defaultlettertemplate, c_3.modifieddate, c_3.number, c_3.recordstatus, c_3.crea (...)
  • Filter: (c_3.useprojectcomponentswithoutinvoiceforcalculation AND c_3.useinvoicesforprojectcalculation AND (NOT c_3. (...)
  • Rows Removed by Filter: 3
120. 0.001 1.716 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5 (cost=4,590.18..4,596.24 rows=303 width=342) (actual time=1.716..1.716 rows=0 loops=1)

  • Output: "*SELECT* 5".project_id, "*SELECT* 5".projectpart_id, "*SELECT* 5".costunit_id, "*SELECT* 5".costunit_name, "*SELECT* 5".costu (...)
121. 0.002 1.715 ↓ 0.0 0 1

HashAggregate (cost=4,590.18..4,593.21 rows=303 width=342) (actual time=1.715..1.715 rows=0 loops=1)

  • Output: pc_4.project_id, pc_4.projectpart_id, cu_4.id, cu_4.name, cu_4.number, pc_4.tenant_id, CASE WHEN (NOT pc_4.external) THE (...)
  • Group Key: pc_4.id, cu_4.id, p_9.id, pa_4.id
122. 0.000 1.713 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,618.94..4,587.15 rows=303 width=342) (actual time=1.713..1.713 rows=0 loops=1)

  • Output: pc_4.id, pc_4.project_id, pc_4.projectpart_id, pc_4.tenant_id, pc_4.external, pc_4.amount, pc_4.extrawork, pc_4.or (...)
  • -> Index Only Scan using projectactivity_pkey on public.projectactivity pa_4 (cost=0.42..3.35 rows=1 width=4) (never exe (...)
123. 0.001 1.713 ↓ 0.0 0 1

Hash Left Join (cost=1,618.52..3,568.06 rows=303 width=342) (actual time=1.713..1.713 rows=0 loops=1)

  • Output: pc_4.id, pc_4.project_id, pc_4.projectpart_id, pc_4.tenant_id, pc_4.external, pc_4.amount, pc_4.extrawork, p (...)
  • Hash Cond: (p_9.costunit_id = cu_4.id)
  • Output: pa_4.id
  • Index Cond: (pa_4.id = pc_4.projectactivity_id)
  • Heap Fetches: 0
124. 0.000 1.712 ↓ 0.0 0 1

Hash Left Join (cost=1,617.16..3,565.54 rows=303 width=42) (actual time=1.712..1.712 rows=0 loops=1)

  • Output: pc_4.id, pc_4.project_id, pc_4.projectpart_id, pc_4.tenant_id, pc_4.external, pc_4.amount, pc_4.extraw (...)
  • Hash Cond: (pc_4.article_id = art.id)
  • Filter: ((art.id IS NULL) OR (NOT art.storedinwarehouse))
125. 1.696 1.712 ↓ 0.0 0 1

Hash Join (cost=898.90..2,835.23 rows=1,685 width=46) (actual time=1.712..1.712 rows=0 loops=1)

  • Output: pc_4.id, pc_4.project_id, pc_4.projectpart_id, pc_4.tenant_id, pc_4.external, pc_4.amount, pc_4. (...)
  • Hash Cond: (pc_4.project_id = p_9.id)
  • -> Bitmap Heap Scan on public.projectcomponent pc_4 (cost=299.93..2194.06 rows=6,759 width=38) (actual (...)
  • Output: pc_4.id, pc_4.amount, pc_4.createddate, pc_4.finisheddimensions, pc_4.modifieddate, pc_4.r (...)
  • Recheck Cond: (pc_4.recordstatus <> 'X'::recordstatus)
  • Filter: ((NOT pc_4.preliminary) AND COALESCE((pc_4.orderdate <= (get_session_var('calcdate'::chara (...)
  • Heap Blocks: exact=1
  • -> Bitmap Index Scan on idx_projectcomponent_notpreliminary (cost=0.00..298.24 rows=15,727 width= (...)
  • Index Cond: (pc_4.preliminary = false)
126. 0.000 0.016 ↓ 0.0 0 1

Hash (cost=579.32..579.32 rows=1,572 width=8) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: p_9.id, p_9.costunit_id
  • Buckets: 2,048 Batches: 1 Memory Usage: 16kB
127. 0.008 0.016 ↓ 0.0 0 1

Hash Join (cost=2.14..579.32 rows=1,572 width=8) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: p_9.id, p_9.costunit_id
  • Hash Cond: (p_9.tenant_id = t_4.id)
  • -> Seq Scan on public.project p_9 (cost=0.00..537.88 rows=6,288 width=12) (actual time=0.00 (...)
  • Output: p_9.id, p_9.createddate, p_9.deliverydate, p_9.description, p_9.modifieddate, (...)
128. 0.008 0.008 ↓ 0.0 0 1

Hash (cost=2.13..2.13 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=1)

  • Output: t_4.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • -> Nested Loop (cost=0.00..2.13 rows=1 width=4) (actual time=0.007..0.007 rows=0 loo (...)
  • Output: t_4.id
  • Join Filter: (t_4.configuration_id = c_4.id)
  • -> Seq Scan on public.configuration c_4 (cost=0.00..1.04 rows=1 width=4) (actu (...)
  • Output: c_4.id, c_4.createddate, c_4.defaultlettertemplate, c_4.modifiedda (...)
  • Filter: ((NOT c_4.useinvoicesforprojectcalculation) AND c_4.onlyusebookedc (...)
  • Rows Removed by Filter: 4
  • -> Seq Scan on public.tenant t_4 (cost=0.00..1.04 rows=4 width=8) (never execu (...)
  • Output: t_4.id, t_4.loginpossible, t_4.name, t_4.number, t_4.region_id, t_ (...)
129. 0.000 0.000 ↓ 0.0 0

Hash (cost=636.45..636.45 rows=6,545 width=5) (never executed)

  • Output: art.id, art.storedinwarehouse
130. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.article art (cost=0.00..636.45 rows=6,545 width=5) (never executed)

  • Output: art.id, art.storedinwarehouse
131. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.16..1.16 rows=16 width=304) (never executed)

  • Output: cu_4.id, cu_4.name, cu_4.number
132. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.costunit cu_4 (cost=0.00..1.16 rows=16 width=304) (never executed)

  • Output: cu_4.id, cu_4.name, cu_4.number
133. 0.142 56.854 ↓ 3.6 1,350 1

Subquery Scan on *SELECT* 6 (cost=3,133.82..3,147.96 rows=377 width=385) (actual time=56.069..56.854 rows=1,350 loops=1)

  • Output: "*SELECT* 6".project_id, "*SELECT* 6".projectpart_id, "*SELECT* 6".costunit_id, "*SELECT* 6".costunit_name, "*SELECT* 6".costunit_number, (...)
134. 3.785 56.712 ↓ 3.6 1,350 1

HashAggregate (cost=3,133.82..3,144.19 rows=377 width=385) (actual time=56.068..56.712 rows=1,350 loops=1)

  • Output: (COALESCE(p_10.id, pc_5.project_id)), pc_5.projectpart_id, cu_5.id, cu_5.name, cu_5.number, sb_1.tenant_id, roundedsum2(CASE WHEN CO (...)
  • Group Key: COALESCE(p_10.id, pc_5.project_id), pc_5.id, cu_5.id, sb_1.tenant_id, sb_1.date
135. 0.447 52.927 ↓ 3.9 1,472 1

Hash Left Join (cost=634.29..3,081.98 rows=377 width=385) (actual time=4.711..52.927 rows=1,472 loops=1)

  • Output: COALESCE(p_10.id, pc_5.project_id), cu_5.id, sb_1.tenant_id, sb_1.date, pc_5.id, pc_5.projectpart_id, cu_5.name, cu_5.number, (...)
  • Hash Cond: (sb_1.costunit_id = cu_5.id)
136. 3.029 52.467 ↓ 3.9 1,472 1

Nested Loop Left Join (cost=632.93..3,079.20 rows=377 width=85) (actual time=4.689..52.467 rows=1,472 loops=1)

  • Output: sb_1.tenant_id, sb_1.date, sb_1.projectpart_id, sb_1.type, sb_1.valuedelta, sb_1.quantitydelta, sb_1.costunit_id, p_10.i (...)
  • -> Index Scan using projectcomponent_pkey on public.projectcomponent pc_5 (cost=0.29..0.44 rows=1 width=14) (actual time=0.001 (...)
137. 4.506 49.438 ↓ 3.9 1,472 1

Nested Loop Left Join (cost=632.64..2,910.25 rows=377 width=71) (actual time=4.684..49.438 rows=1,472 loops=1)

  • Output: sb_1.tenant_id, sb_1.date, sb_1.projectpart_id, sb_1.type, sb_1.valuedelta, sb_1.quantitydelta, sb_1.costunit_id, (...)
  • -> Index Scan using article_pkey on public.article art_1 (cost=0.28..0.35 rows=1 width=20) (actual time=0.002..0.002 row (...)
  • Output: pc_5.id, pc_5.amount, pc_5.createddate, pc_5.finisheddimensions, pc_5.modifieddate, pc_5.recordstatus, pc_5.versio (...)
  • Index Cond: (pc_5.id = pc_6.id)
138. 3.944 44.932 ↓ 3.9 1,472 1

Nested Loop Left Join (cost=632.36..2,774.21 rows=377 width=59) (actual time=4.675..44.932 rows=1,472 loops=1)

  • Output: sb_1.tenant_id, sb_1.date, sb_1.projectpart_id, sb_1.type, sb_1.valuedelta, sb_1.quantitydelta, sb_1.costuni (...)
  • -> Index Scan using projectcomponent_pkey on public.projectcomponent pc_6 (cost=0.29..2.26 rows=1 width=16) (actua (...)
  • Output: art_1.id, art_1.buyproduct, art_1.coefficient, art_1.ean, art_1.name, art_1.number, art_1.numberforvendor, a (...)
  • Index Cond: (art_1.id = pc_6.article_id)
139. 0.447 40.988 ↓ 3.9 1,472 1

Hash Join (cost=632.07..1,918.45 rows=377 width=47) (actual time=4.665..40.988 rows=1,472 loops=1)

  • Output: sb_1.tenant_id, sb_1.date, sb_1.projectpart_id, sb_1.type, sb_1.valuedelta, sb_1.quantitydelta, sb_1.p (...)
  • Hash Cond: (sb_1.tenant_id = t_5.id)
  • Output: pc_6.id, pc_6.amount, pc_6.createddate, pc_6.finisheddimensions, pc_6.modifieddate, pc_6.recordstatus, (...)
  • Index Cond: (pc_6.id = sb_1.projectcomponent_id)
  • Filter: (pc_6.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 0
140. 38.079 40.502 ↓ 3.9 1,472 1

Hash Join (cost=629.84..1,911.03 rows=377 width=44) (actual time=4.619..40.502 rows=1,472 loops=1)

  • Output: sb_1.tenant_id, sb_1.date, sb_1.projectpart_id, sb_1.type, sb_1.valuedelta, sb_1.quantitydelta, (...)
  • Hash Cond: (sb_1.project_id = p_10.id)
  • -> Seq Scan on public.stockbooking sb_1 (cost=0.00..1265.75 rows=3,114 width=44) (actual time=0.019..36 (...)
  • Output: sb_1.id, sb_1.quantity, sb_1.stock_id, sb_1.counterbooking_id, sb_1.importeddate, sb_1.num (...)
  • Filter: ((sb_1.date >= (COALESCE(get_session_var('startdate'::character varying), '1900-01-01'::ch (...)
141. 2.423 2.423 ↑ 1.0 6,099 1

Hash (cost=553.60..553.60 rows=6,099 width=4) (actual time=2.423..2.423 rows=6,099 loops=1)

  • Output: p_10.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 279kB
  • -> Seq Scan on public.project p_10 (cost=0.00..553.60 rows=6,099 width=4) (actual time=0.003..1.6 (...)
  • Output: p_10.id
  • Filter: (p_10.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 189
142. 0.005 0.039 ↑ 1.0 4 1

Hash (cost=2.19..2.19 rows=4 width=7) (actual time=0.039..0.039 rows=4 loops=1)

  • Output: t_5.id, c_5.usestockbookingcostsforprojectcalculation, c_5.usematerialcostsforprojectcalculation (...)
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
143. 0.011 0.034 ↑ 1.0 4 1

Hash Join (cost=1.09..2.19 rows=4 width=7) (actual time=0.032..0.034 rows=4 loops=1)

  • Output: t_5.id, c_5.usestockbookingcostsforprojectcalculation, c_5.usematerialcostsforprojectcalcu (...)
  • Hash Cond: (t_5.configuration_id = c_5.id)
  • -> Seq Scan on public.tenant t_5 (cost=0.00..1.04 rows=4 width=8) (actual time=0.001..0.001 rows (...)
  • Output: t_5.id, t_5.loginpossible, t_5.name, t_5.number, t_5.region_id, t_5.country_id, t_5. (...)
144. 0.023 0.023 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=7) (actual time=0.023..0.023 rows=4 loops=1)

  • Output: c_5.usestockbookingcostsforprojectcalculation, c_5.usematerialcostsforprojectcalcula (...)
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • -> Seq Scan on public.configuration c_5 (cost=0.00..1.04 rows=4 width=7) (actual time=0.00 (...)
  • Output: c_5.usestockbookingcostsforprojectcalculation, c_5.usematerialcostsforprojectc (...)
145. 0.009 0.013 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=304) (actual time=0.013..0.013 rows=16 loops=1)

  • Output: cu_5.id, cu_5.name, cu_5.number
  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
146. 0.004 0.004 ↑ 1.0 16 1

Seq Scan on public.costunit cu_5 (cost=0.00..1.16 rows=16 width=304) (actual time=0.002..0.004 rows=16 loops=1)

  • Output: cu_5.id, cu_5.name, cu_5.number
147. 0.069 2,127.395 ↓ 2.0 2 1

HashAggregate (cost=1,637,730.46..1,637,730.48 rows=1 width=40) (actual time=2,127.394..2,127.395 rows=2 loops=1)

  • Output: fkt_vw_projectcalculation.project_id, NULL::integer, fkt_vw_projectcalculation.activity_id, roundedsum2(fkt_vw_projectcalculation.realdatapersonhours), roundedsum2(fkt_vw_projectcalculation.realdata (...)
  • Group Key: fkt_vw_projectcalculation.project_id, fkt_vw_projectcalculation.activity_id
148. 16.337 2,127.326 ↓ 2.0 2 1

Subquery Scan on fkt_vw_projectcalculation (cost=1,635,396.44..1,637,730.44 rows=1 width=40) (actual time=2,125.470..2,127.326 rows=2 loops=1)

  • Output: fkt_vw_projectcalculation.id, fkt_vw_projectcalculation.project_id, fkt_vw_projectcalculation.activity_id, fkt_vw_projectcalculation.projectpart_id, fkt_vw_projectcalculation.preplannedpersonh (...)
  • Filter: ((fkt_vw_projectcalculation.projectpart_id IS NULL) AND (fkt_vw_projectcalculation.project_id = 6,583))
  • Rows Removed by Filter: 201,241
149. 217.556 2,110.989 ↓ 2.4 201,243 1

Merge Left Join (cost=1,635,396.44..1,636,697.84 rows=82,608 width=52) (actual time=1,833.865..2,110.989 rows=201,243 loops=1)

  • Output: (nextval('vw_default_seq'::regclass))::integer, p_11.id, (COALESCE(preplanned_1.activity_id, pa_5.task_id, realdata_1.activity_id)), (COALESCE(pp_5.id, realdata_1.projectpart_id)), NULL: (...)
  • Merge Cond: ((COALESCE(pp_5.id, realdata_1.projectpart_id)) = sb_2.projectpart_id)
150. 231.422 1,885.122 ↓ 2.4 201,243 1

Sort (cost=1,633,781.67..1,633,988.19 rows=82,608 width=44) (actual time=1,825.532..1,885.122 rows=201,243 loops=1)

  • Output: p_11.id, (COALESCE(preplanned_1.activity_id, pa_5.task_id, realdata_1.activity_id)), (COALESCE(pp_5.id, realdata_1.projectpart_id)), ((COALESCE(realdata_1.personhours, '0'::numeric (...)
  • Sort Key: (COALESCE(pp_5.id, realdata_1.projectpart_id))
  • Sort Method: external merge Disk: 11,096kB
151. 47.820 1,653.700 ↓ 2.4 201,243 1

Hash Full Join (cost=89,875.69..1,624,490.58 rows=82,608 width=44) (actual time=1,253.668..1,653.700 rows=201,243 loops=1)

  • Output: p_11.id, (COALESCE(preplanned_1.activity_id, pa_5.task_id, realdata_1.activity_id)), (COALESCE(pp_5.id, realdata_1.projectpart_id)), ((COALESCE(realdata_1.personhours, '0'::n (...)
  • Hash Cond: ((COALESCE(preplanned_1.activity_id, pa_5.task_id, realdata_1.activity_id)) = act_2.id)
152. 55.988 1,605.860 ↓ 2.4 201,242 1

Hash Full Join (cost=89,866.91..1,623,845.72 rows=82,608 width=44) (actual time=1,253.639..1,605.860 rows=201,242 loops=1)

  • Output: p_11.id, (COALESCE(preplanned_1.activity_id, pa_5.task_id, realdata_1.activity_id)), (COALESCE(pp_5.id, realdata_1.projectpart_id)), ((COALESCE(realdata_1.personhours, (...)
  • Hash Cond: (COALESCE(preplanned_1.project_id, p_12.id, realdata_1.project_id) = p_11.id)
153. 229.645 1,521.152 ↓ 2.4 200,301 1

Hash Full Join (cost=87,680.62..1,620,523.57 rows=82,608 width=52) (actual time=1,224.908..1,521.152 rows=200,301 loops=1)

  • Output: preplanned_1.project_id, p_12.id, realdata_1.project_id, COALESCE(preplanned_1.activity_id, pa_5.task_id, realdata_1.activity_id), COALESCE(pp_5.id, realdata_1.pr (...)
  • Hash Cond: ((p_12.id = realdata_1.project_id) AND (pp_5.id = realdata_1.projectpart_id) AND (pa_5.task_id = realdata_1.activity_id))
  • Join Filter: (NOT ((pa_5.finished OR ((p_12.status)::text = 'DONE'::text))))
  • Rows Removed by Join Filter: 71,206
154. 14.123 507.016 ↓ 1.4 116,388 1

Merge Full Join (cost=48,790.73..53,030.97 rows=82,608 width=21) (actual time=440.253..507.016 rows=116,388 loops=1)

  • Output: preplanned_1.project_id, preplanned_1.activity_id, p_12.id, pa_5.task_id, pp_5.id, ((pa_5.finished OR ((p_12.status)::text = 'DONE'::text)))
  • Merge Cond: ((p_12.id = preplanned_1.project_id) AND (pp_5.id = preplanned_1.projectpart_id) AND (pa_5.task_id = preplanned_1.activity_id))
155. 31.713 254.186 ↓ 1.0 84,612 1

GroupAggregate (cost=24,098.89..26,164.09 rows=82,608 width=18) (actual time=205.358..254.186 rows=84,612 loops=1)

  • Output: p_12.id, pp_5.id, pa_5.task_id, NULL::numeric, NULL::bigint, NULL::numeric, NULL::numeric, NULL::numeric, NULL::double precision, NULL::double precisi (...)
  • Group Key: p_12.id, pp_5.id, pa_5.task_id, pa_5.finished
156. 81.787 222.473 ↓ 1.1 90,130 1

Sort (cost=24,098.89..24,305.41 rows=82,608 width=18) (actual time=205.348..222.473 rows=90,130 loops=1)

  • Output: p_12.id, pp_5.id, pa_5.task_id, pa_5.finished, p_12.status
  • Sort Key: p_12.id, pp_5.id, pa_5.task_id, pa_5.finished
  • Sort Method: external merge Disk: 2,536kB
157. 17.296 140.686 ↓ 1.1 90,130 1

Hash Join (cost=6,332.79..17,352.30 rows=82,608 width=18) (actual time=34.795..140.686 rows=90,130 loops=1)

  • Output: p_12.id, pp_5.id, pa_5.task_id, pa_5.finished, p_12.status
  • Hash Cond: (pp_5.project_id = p_12.id)
158. 25.264 120.277 ↓ 1.1 90,144 1

Hash Join (cost=5,716.31..15,598.89 rows=82,893 width=13) (actual time=31.647..120.277 rows=90,144 loops=1)

  • Output: pa_5.task_id, pa_5.finished, pp_5.id, pp_5.project_id
  • Hash Cond: (pa_5.projectpart_id = pp_5.id)
159. 63.896 63.896 ↑ 1.0 90,144 1

Seq Scan on public.projectactivity pa_5 (cost=0.00..8,708.36 rows=92,076 width=9) (actual time=0.076..63.896 rows=90,144 loops=1)

  • Output: pa_5.id, pa_5.amount, pa_5.comment, pa_5.createddate, pa_5.modifieddate, pa_5."position", pa_5.recordstatus, pa_5.version, pa_ (...)
  • Filter: ((NOT pa_5.preliminary) AND (NOT pa_5.external) AND (pa_5.recordstatus <> 'X'::recordstatus))
  • Rows Removed by Filter: 112,525
160. 11.545 31.117 ↓ 1.0 72,175 1

Hash (cost=4,815.07..4,815.07 rows=72,099 width=8) (actual time=31.117..31.117 rows=72,175 loops=1)

  • Output: pp_5.id, pp_5.project_id
  • Buckets: 131,072 Batches: 1 Memory Usage: 3,843kB
161. 19.572 19.572 ↓ 1.0 72,175 1

Seq Scan on public.projectpart pp_5 (cost=0.00..4,815.07 rows=72,099 width=8) (actual time=0.004..19.572 rows=72,175 loops=1)

  • Output: pp_5.id, pp_5.project_id
  • Filter: (pp_5.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 7,911
162. 0.897 3.113 ↑ 1.0 6,288 1

Hash (cost=537.88..537.88 rows=6,288 width=9) (actual time=3.113..3.113 rows=6,288 loops=1)

  • Output: p_12.id, p_12.status
  • Buckets: 8,192 Batches: 1 Memory Usage: 320kB
163. 2.216 2.216 ↑ 1.0 6,288 1

Seq Scan on public.project p_12 (cost=0.00..537.88 rows=6,288 width=9) (actual time=0.008..2.216 rows=6,288 loops=1)

  • Output: p_12.id, p_12.status
164. 26.720 238.707 ↑ 2.3 31,776 1

Sort (cost=24,691.84..24,872.33 rows=72,195 width=12) (actual time=234.889..238.707 rows=31,776 loops=1)

  • Output: preplanned_1.project_id, preplanned_1.activity_id, preplanned_1.projectpart_id
  • Sort Key: preplanned_1.project_id, preplanned_1.projectpart_id, preplanned_1.activity_id
  • Sort Method: quicksort Memory: 2,258kB
165. 3.599 211.987 ↑ 2.3 31,776 1

Subquery Scan on preplanned_1 (cost=17,421.94..18,865.84 rows=72,195 width=12) (actual time=197.970..211.987 rows=31,776 loops=1)

  • Output: preplanned_1.project_id, preplanned_1.activity_id, preplanned_1.projectpart_id
166. 37.329 208.388 ↑ 2.3 31,776 1

HashAggregate (cost=17,421.94..18,143.89 rows=72,195 width=8) (actual time=197.969..208.388 rows=31,776 loops=1)

  • Output: p_13.id, NULL::integer, pa_6.task_id, NULL::numeric, NULL::numeric, NULL::double precision, NULL::double precision
  • Group Key: p_13.id, pa_6.task_id
167. 21.392 171.059 ↓ 1.1 82,347 1

Hash Join (cost=6,332.79..17,060.97 rows=72,195 width=8) (actual time=31.967..171.059 rows=82,347 loops=1)

  • Output: pa_6.task_id, p_13.id
  • Hash Cond: (pp_6.project_id = p_13.id)
168. 30.462 147.965 ↓ 1.1 83,095 1

Hash Join (cost=5,716.31..15,450.87 rows=72,444 width=8) (actual time=30.223..147.965 rows=83,095 loops=1)

  • Output: pa_6.task_id, pp_6.project_id
  • Hash Cond: (pa_6.projectpart_id = pp_6.id)
169. 87.700 87.700 ↓ 1.0 83,095 1

Seq Scan on public.projectactivity pa_6 (cost=0.00..8,708.36 rows=80,469 width=8) (actual time=0.005..87.700 rows=83,095 loops=1)

  • Output: pa_6.id, pa_6.amount, pa_6.comment, pa_6.createddate, pa_6.modifieddate, pa_6."position", pa_6.recordstatus, pa_6.versio (...)
  • Filter: (pa_6.preliminary AND (NOT pa_6.external) AND (pa_6.recordstatus <> 'X'::recordstatus))
  • Rows Removed by Filter: 119,574
170. 10.618 29.803 ↓ 1.0 72,175 1

Hash (cost=4,815.07..4,815.07 rows=72,099 width=8) (actual time=29.803..29.803 rows=72,175 loops=1)

  • Output: pp_6.id, pp_6.project_id
  • Buckets: 131,072 Batches: 1 Memory Usage: 3,843kB
171. 19.185 19.185 ↓ 1.0 72,175 1

Seq Scan on public.projectpart pp_6 (cost=0.00..4,815.07 rows=72,099 width=8) (actual time=0.004..19.185 rows=72,175 loops=1)

  • Output: pp_6.id, pp_6.project_id
  • Filter: (pp_6.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 7,911
172. 0.627 1.702 ↑ 1.0 6,288 1

Hash (cost=537.88..537.88 rows=6,288 width=4) (actual time=1.702..1.702 rows=6,288 loops=1)

  • Output: p_13.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 286kB
173. 1.075 1.075 ↑ 1.0 6,288 1

Seq Scan on public.project p_13 (cost=0.00..537.88 rows=6,288 width=4) (actual time=0.005..1.075 rows=6,288 loops=1)

  • Output: p_13.id
174. 25.418 784.491 ↓ 1.7 84,366 1

Hash (cost=37,305.70..37,305.70 rows=49,268 width=92) (actual time=784.491..784.491 rows=84,366 loops=1)

  • Output: realdata_1.project_id, realdata_1.projectpart_id, realdata_1.activity_id, realdata_1.personhours, realdata_1.machinehours, realdata_1.personcosts, realdata_ (...)
  • Buckets: 32,768 Batches: 2 Memory Usage: 3,252kB
175. 6.151 759.073 ↓ 1.7 84,366 1

Subquery Scan on realdata_1 (cost=34,595.96..37,305.70 rows=49,268 width=92) (actual time=597.844..759.073 rows=84,366 loops=1)

  • Output: realdata_1.project_id, realdata_1.projectpart_id, realdata_1.activity_id, realdata_1.personhours, realdata_1.machinehours, realdata_1.personcosts, rea (...)
176. 102.825 752.922 ↓ 1.7 84,366 1

GroupAggregate (cost=34,595.96..36,813.02 rows=49,268 width=40) (actual time=597.843..752.922 rows=84,366 loops=1)

  • Output: pac_1.project_id, (COALESCE(pac_1.projectpart_id, pp_7.id)), pac_1.activity_id, NULL::boolean, round(((sum(pac_1.personminutes))::numeric / 60.0 (...)
  • Group Key: pac_1.project_id, (COALESCE(pac_1.projectpart_id, pp_7.id)), pac_1.activity_id
177. 234.857 650.097 ↓ 4.0 197,072 1

Sort (cost=34,595.96..34,719.13 rows=49,268 width=40) (actual time=597.819..650.097 rows=197,072 loops=1)

  • Output: pac_1.project_id, (COALESCE(pac_1.projectpart_id, pp_7.id)), pac_1.activity_id, pac_1.personminutes, pac_1.machineminutes, pac_1.personcos (...)
  • Sort Key: pac_1.project_id, (COALESCE(pac_1.projectpart_id, pp_7.id)), pac_1.activity_id
  • Sort Method: external merge Disk: 9,592kB
178. 61.264 415.240 ↓ 4.0 197,072 1

Hash Left Join (cost=17,243.37..30,755.93 rows=49,268 width=40) (actual time=121.641..415.240 rows=197,072 loops=1)

  • Output: pac_1.project_id, COALESCE(pac_1.projectpart_id, pp_7.id), pac_1.activity_id, pac_1.personminutes, pac_1.machineminutes, pac_1.perso (...)
  • Hash Cond: (pa_7.projectpart_id = pp_7.id)
179. 233.733 324.265 ↓ 4.0 197,072 1

Hash Left Join (cost=11,527.05..24,411.32 rows=49,268 width=40) (actual time=91.505..324.265 rows=197,072 loops=1)

  • Output: pac_1.project_id, pac_1.projectpart_id, pac_1.activity_id, pac_1.personminutes, pac_1.machineminutes, pac_1.personcosts, pac_1 (...)
  • Hash Cond: (pac_1.projectactivity_id = pa_7.id)
  • -> Seq Scan on public.projectactivityconfirmation pac_1 (cost=0.00..10680.16 rows=49,268 width=40) (actual time=0.067..91.799 rows=19 (...)
  • Output: pac_1.project_id, pac_1.projectpart_id, pac_1.activity_id, pac_1.personminutes, pac_1.machineminutes, pac_1.personcosts, (...)
  • Filter: (COALESCE((pac_1.date <= (get_session_var('calcdate'::character varying))::date), true) AND COALESCE((pac_1.date >= (get (...)
180. 90.532 90.532 ↑ 1.0 202,669 1

Hash (cost=8,201.69..8,201.69 rows=202,669 width=8) (actual time=90.532..90.532 rows=202,669 loops=1)

  • Output: pa_7.id, pa_7.projectpart_id
  • Buckets: 131,072 Batches: 4 Memory Usage: 3,018kB
  • -> Seq Scan on public.projectactivity pa_7 (cost=0.00..8201.69 rows=202,669 width=8) (actual time=0.007..54.219 rows=202,669 loo (...)
  • Output: pa_7.id, pa_7.projectpart_id
181. 11.503 29.711 ↓ 1.0 72,175 1

Hash (cost=4,815.07..4,815.07 rows=72,099 width=4) (actual time=29.711..29.711 rows=72,175 loops=1)

  • Output: pp_7.id
  • Buckets: 131,072 Batches: 1 Memory Usage: 3,562kB
182. 18.208 18.208 ↓ 1.0 72,175 1

Seq Scan on public.projectpart pp_7 (cost=0.00..4,815.07 rows=72,099 width=4) (actual time=0.006..18.208 rows=72,175 loops=1)

  • Output: pp_7.id
  • Filter: (pp_7.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 7,911
183. 0.833 28.720 ↑ 1.0 6,288 1

Hash (cost=2,107.69..2,107.69 rows=6,288 width=4) (actual time=28.720..28.720 rows=6,288 loops=1)

  • Output: p_11.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 286kB
184. 1.554 27.887 ↑ 1.0 6,288 1

Hash Left Join (cost=1,483.11..2,107.69 rows=6,288 width=4) (actual time=25.395..27.887 rows=6,288 loops=1)

  • Output: p_11.id
  • Hash Cond: (p_11.id = subq_1.project_id)
185. 0.948 0.948 ↑ 1.0 6,288 1

Seq Scan on public.project p_11 (cost=0.00..537.88 rows=6,288 width=4) (actual time=0.002..0.948 rows=6,288 loops=1)

  • Output: p_11.id, p_11.createddate, p_11.deliverydate, p_11.description, p_11.modifieddate, p_11.number, p_11.recordstatus, p_11.version, p_11.workcardcomment, (...)
186. 0.757 25.385 ↓ 254.1 6,099 1

Hash (cost=1,482.81..1,482.81 rows=24 width=4) (actual time=25.385..25.385 rows=6,099 loops=1)

  • Output: subq_1.project_id
  • Buckets: 8,192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 279kB
187. 1.223 24.628 ↓ 254.1 6,099 1

Subquery Scan on subq_1 (cost=1,324.95..1,482.81 rows=24 width=4) (actual time=12.912..24.628 rows=6,099 loops=1)

  • Output: subq_1.project_id
  • Filter: (subq_1.rank = 1)
  • Rows Removed by Filter: 13,330
188. 9.571 23.405 ↓ 4.0 19,429 1

WindowAgg (cost=1,324.95..1,422.09 rows=4,857 width=12) (actual time=12.908..23.405 rows=19,429 loops=1)

  • Output: projectstatuschange_1.project_id, NULL::character varying(10), NULL::integer, rank() OVER (?), projectstatuschange_1.startdate
189. 13.834 13.834 ↓ 4.0 19,429 1

Sort (cost=1,324.95..1,337.10 rows=4,857 width=12) (actual time=12.898..13.834 rows=19,429 loops=1)

  • Output: projectstatuschange_1.project_id, projectstatuschange_1.startdate
  • Sort Key: projectstatuschange_1.project_id, projectstatuschange_1.startdate DESC
  • Sort Method: quicksort Memory: 1,679kB
  • -> Seq Scan on public.projectstatuschange projectstatuschange_1 (cost=0.00..1027.56 rows=4,857 width=12) (actual time=0.012..7.299 rows=194 (...)
  • Output: projectstatuschange_1.project_id, projectstatuschange_1.startdate
  • Filter: ((projectstatuschange_1.recordstatus <> 'X'::recordstatus) AND COALESCE(((projectstatuschange_1.startdate)::date <= (get_sessi (...)
  • Rows Removed by Filter: 26
190. 0.010 0.020 ↑ 1.0 79 1

Hash (cost=7.79..7.79 rows=79 width=4) (actual time=0.020..0.020 rows=79 loops=1)

  • Output: act_2.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
191. 0.010 0.010 ↑ 1.0 79 1

Seq Scan on public.activity act_2 (cost=0.00..7.79 rows=79 width=4) (actual time=0.001..0.010 rows=79 loops=1)

  • Output: act_2.id
192. 1.345 8.311 ↑ 12,455.0 1 1

Sort (cost=1,614.77..1,645.90 rows=12,455 width=12) (actual time=8.311..8.311 rows=1 loops=1)

  • Output: sb_2.valuedelta, sb_2.projectpart_id
  • Sort Key: sb_2.projectpart_id
  • Sort Method: quicksort Memory: 968kB
193. 6.966 6.966 ↑ 1.0 12,455 1

Seq Scan on public.stockbooking sb_2 (cost=0.00..767.55 rows=12,455 width=12) (actual time=0.014..6.966 rows=12,455 loops=1)

  • Output: sb_2.valuedelta, sb_2.projectpart_id
194. 0.000 133.184 ↓ 0.0 0 1

Subquery Scan on ccosts_1 (cost=10,571.94..10,572.06 rows=6 width=20) (actual time=133.184..133.184 rows=0 loops=1)

  • Output: ccosts_1.project_id, NULL::integer, NULL::integer, NULL::double precision, NULL::double precision, NULL::double precision, NULL::double precision, COALESCE(ccosts_1.sumcosts, '0'::double precision), (...)
195. 0.002 133.184 ↓ 0.0 0 1

HashAggregate (cost=10,571.94..10,572.00 rows=6 width=332) (actual time=133.184..133.184 rows=0 loops=1)

  • Output: p_14.id, pc_7.projectpart_id, cu_6.id, cu_6.name, cu_6.number, (COALESCE(pc_7.tenant_id, p_14.tenant_id)), COALESCE(sum((roundedsum2(CASE WHEN (COALESCE((NOT pc_7.external), false) AND (pc_7.o (...)
  • Group Key: p_14.id, pc_7.projectpart_id, cu_6.id, cu_6.name, cu_6.number, (COALESCE(pc_7.tenant_id, p_14.tenant_id))
196. 0.001 133.182 ↓ 0.0 0 1

Append (cost=25.57..10,571.76 rows=6 width=366) (actual time=133.182..133.182 rows=0 loops=1)

197. 0.001 83.540 ↓ 0.0 0 1

Result (cost=25.57..7,633.12 rows=5 width=362) (actual time=83.540..83.540 rows=0 loops=1)

  • Output: p_14.id, pc_7.projectpart_id, cu_6.id, cu_6.name, cu_6.number, (COALESCE(pc_7.tenant_id, p_14.tenant_id)), (roundedsum2(CASE WHEN (COALESCE((NOT pc_7.external), false) AND (pc_7.or (...)
198. 0.003 83.539 ↓ 0.0 0 1

Append (cost=25.57..7,633.12 rows=5 width=362) (actual time=83.539..83.539 rows=0 loops=1)

199. 0.001 0.074 ↓ 0.0 0 1

HashAggregate (cost=25.57..25.60 rows=1 width=349) (actual time=0.074..0.074 rows=0 loops=1)

  • Output: p_14.id, pc_7.projectpart_id, cu_6.id, cu_6.name, cu_6.number, (COALESCE(pc_7.tenant_id, p_14.tenant_id)), roundedsum2(CASE WHEN (COALESCE((NOT pc_7.external), false) A (...)
  • Group Key: p_14.id, pc_7.projectpart_id, cu_6.id, cu_6.name, cu_6.number, COALESCE(pc_7.tenant_id, p_14.tenant_id), pc_7.orderdate
200. 0.006 0.073 ↓ 0.0 0 1

Nested Loop (cost=0.57..25.54 rows=1 width=349) (actual time=0.073..0.073 rows=0 loops=1)

  • Output: p_14.id, pc_7.projectpart_id, cu_6.id, cu_6.name, cu_6.number, COALESCE(pc_7.tenant_id, p_14.tenant_id), pc_7.orderdate, pc_7.external, pc_7.amount, pc_7.autogene (...)
  • Join Filter: (t_6.configuration_id = c_6.id)
201. 0.009 0.056 ↑ 1.0 1 1

Nested Loop (cost=0.57..24.49 rows=1 width=353) (actual time=0.055..0.056 rows=1 loops=1)

  • Output: p_14.id, p_14.tenant_id, p_14.number, cu_6.id, cu_6.name, cu_6.number, pc_7.projectpart_id, pc_7.tenant_id, pc_7.orderdate, pc_7.external, pc_7.amount, pc_7 (...)
  • Join Filter: (p_14.tenant_id = t_6.id)
  • Rows Removed by Join Filter: 3
202. 0.017 0.045 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.57..23.40 rows=1 width=349) (actual time=0.044..0.045 rows=1 loops=1)

  • Output: p_14.id, p_14.tenant_id, p_14.number, cu_6.id, cu_6.name, cu_6.number, pc_7.projectpart_id, pc_7.tenant_id, pc_7.orderdate, pc_7.external, pc_7.amount (...)
  • Join Filter: (cu_6.id = p_14.costunit_id)
  • Rows Removed by Join Filter: 16
203. 0.015 0.025 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.57..22.04 rows=1 width=49) (actual time=0.024..0.025 rows=1 loops=1)

  • Output: p_14.id, p_14.tenant_id, p_14.number, p_14.costunit_id, pc_7.projectpart_id, pc_7.tenant_id, pc_7.orderdate, pc_7.external, pc_7.amount, pc_7.au (...)
  • Join Filter: (pc_7.project_id = p_14.id)
  • Filter: ((pc_7.projectpart_id IS NULL) AND COALESCE((pc_7.orderdate <= (get_session_var('calcdate'::character varying))::date), true) AND COALESCE((pc_7 (...)
  • -> Index Scan using idx_projectcomponent_project_id on public.projectcomponent pc_7 (cost=0.29..13.54 rows=6 width=27) (actual time=0.005..0.005 rows= (...)
204. 0.010 0.010 ↑ 1.0 1 1

Index Scan using project_pkey on public.project p_14 (cost=0.28..8.30 rows=1 width=26) (actual time=0.010..0.010 rows=1 loops=1)

  • Output: p_14.id, p_14.createddate, p_14.deliverydate, p_14.description, p_14.modifieddate, p_14.number, p_14.recordstatus, p_14.version, p_14.work (...)
  • Index Cond: (p_14.id = 6,583)
  • Output: pc_7.id, pc_7.amount, pc_7.createddate, pc_7.finisheddimensions, pc_7.modifieddate, pc_7.recordstatus, pc_7.version, pc_7.article_id, pc_7 (...)
  • Index Cond: (pc_7.project_id = 6,583)
  • Filter: ((NOT pc_7.preliminary) AND (pc_7.recordstatus <> 'X'::recordstatus) AND (pc_7.bookedquantity = '0'::double precision))
205. 0.003 0.003 ↑ 1.0 16 1

Seq Scan on public.costunit cu_6 (cost=0.00..1.16 rows=16 width=304) (actual time=0.003..0.003 rows=16 loops=1)

  • Output: cu_6.id, cu_6.createddate, cu_6.description, cu_6.modifieddate, cu_6.name, cu_6.number, cu_6.recordstatus, cu_6.createdby_id, cu_6.modifiedby_id (...)
206. 0.002 0.002 ↑ 1.0 4 1

Seq Scan on public.tenant t_6 (cost=0.00..1.04 rows=4 width=8) (actual time=0.001..0.002 rows=4 loops=1)

  • Output: t_6.id, t_6.loginpossible, t_6.name, t_6.number, t_6.region_id, t_6.country_id, t_6.recordstatus, t_6.createddate, t_6.modifieddate, t_6.modifiedby_id (...)
207. 0.011 0.011 ↓ 0.0 0 1

Seq Scan on public.configuration c_6 (cost=0.00..1.04 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=1)

  • Output: c_6.id, c_6.createddate, c_6.defaultlettertemplate, c_6.modifieddate, c_6.number, c_6.recordstatus, c_6.createdby_id, c_6.modifiedby_id, c_6.bookoutgoingaft (...)
  • Filter: ((NOT c_6.useinvoicesforprojectcalculation) AND (NOT c_6.onlyusebookedcomponentsforprojectcalculation))
  • Rows Removed by Filter: 4
208. 0.001 72.997 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_1 (cost=3,815.63..3,815.67 rows=1 width=393) (actual time=72.997..72.997 rows=0 loops=1)

  • Output: "*SELECT* 2_1".project_id, "*SELECT* 2_1".projectpart_id, "*SELECT* 2_1".costunit_id, "*SELECT* 2_1".costunit_name, "*SELECT* 2_1".costunit_number, "*SELECT* 2_1".tenan (...)
209. 0.002 72.996 ↓ 0.0 0 1

HashAggregate (cost=3,815.63..3,815.66 rows=1 width=393) (actual time=72.996..72.996 rows=0 loops=1)

  • Output: COALESCE(pc_8.project_id, p_15.id), pc_8.projectpart_id, cu_7.id, cu_7.name, cu_7.number, (COALESCE(pc_8.tenant_id, p_15.tenant_id)), roundedsum2(CASE WHEN (((pc_ (...)
  • Group Key: p_15.id, cu_7.id, cu_7.name, cu_7.number, COALESCE(pc_8.tenant_id, p_15.tenant_id), pi_1.id, pii_2.positionnumber, pc_8.id
210. 0.001 72.994 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,456.66..3,815.52 rows=1 width=393) (actual time=72.994..72.994 rows=0 loops=1)

  • Output: cu_7.id, cu_7.name, cu_7.number, COALESCE(pc_8.tenant_id, p_15.tenant_id), p_15.id, pi_1.id, pii_2.positionnumber, pc_8.id, pc_8.project_id, pc_8.projectpar (...)
211. 0.000 72.993 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,456.53..3,815.36 rows=1 width=93) (actual time=72.993..72.993 rows=0 loops=1)

  • Output: pi_1.id, pi_1.amount, pi_1.amountshipping, pi_1.date, pi_1.number, pii_2.positionnumber, pii_2.componentexternal, pii_2.amount, pii_2.prepaymentfactor (...)
  • Join Filter: (pois_2.id IS NULL)
  • Rows Removed by Join Filter: 3
  • Filter: ((pc_8.projectpart_id IS NULL) AND ((pc_8.* IS NULL) OR (pc_8.bookedquantity = '0'::double precision) OR (NOT c_7.ignorepurchaseinvoicesoncomponentswi (...)
  • Rows Removed by Filter: 11,802
212. 2.996 51.481 ↓ 16.4 11,802 1

Hash Join (cost=1,456.24..3,212.24 rows=721 width=84) (actual time=35.865..51.481 rows=11,802 loops=1)

  • Output: pi_1.id, pi_1.amount, pi_1.amountshipping, pi_1.date, pi_1.number, pii_2.positionnumber, pii_2.componentexternal, pii_2.amount, pii_2.prepayment (...)
  • Hash Cond: (COALESCE(pois_2.project_id, pii_2.project_id, pi_1.project_id) = p_15.id)
213. 1.669 42.398 ↓ 4.1 11,964 1

Hash Left Join (cost=857.26..2,595.24 rows=2,885 width=83) (actual time=29.759..42.398 rows=11,964 loops=1)

  • Output: pi_1.id, pi_1.amount, pi_1.amountshipping, pi_1.date, pi_1.number, pi_1.project_id, pii_2.positionnumber, pii_2.componentexternal, pii_2.a (...)
  • Hash Cond: (pii_2.id = pois_2.purchaseinvoiceitem_id)
214. 3.317 40.713 ↓ 4.1 11,962 1

Hash Join (cost=856.13..2,583.28 rows=2,885 width=71) (actual time=29.728..40.713 rows=11,962 loops=1)

  • Output: pi_1.id, pi_1.amount, pi_1.amountshipping, pi_1.date, pi_1.number, pi_1.project_id, pii_2.positionnumber, pii_2.componentexternal, p (...)
  • Hash Cond: (pii_2.purchaseinvoice_id = pi_1.id)
215. 7.811 7.811 ↓ 1.0 11,962 1

Seq Scan on public.purchaseinvoiceitem pii_2 (cost=0.00..1,653.78 rows=11,871 width=35) (actual time=0.129..7.811 rows=11,962 loops=1)

  • Output: pii_2.id, pii_2.description, pii_2."position", pii_2.quantity, pii_2.version, pii_2.unit_id, pii_2.amount, pii_2.amountwithout (...)
  • Filter: ((pii_2.recordstatus <> 'X'::recordstatus) AND ((pii_2.status)::text <> ALL ('{ENTRY,CANCELLED}'::text[])) AND (((pii_2.invoic (...)
  • Rows Removed by Filter: 177
216. 2.210 29.585 ↓ 4.0 5,008 1

Hash (cost=840.48..840.48 rows=1,252 width=40) (actual time=29.585..29.585 rows=5,008 loops=1)

  • Output: pi_1.id, pi_1.amount, pi_1.amountshipping, pi_1.date, pi_1.number, pi_1.project_id
  • Buckets: 8,192 (originally 2048) Batches: 1 (originally 1) Memory Usage: 422kB
217. 27.375 27.375 ↓ 4.0 5,008 1

Seq Scan on public.purchaseinvoice pi_1 (cost=0.00..840.48 rows=1,252 width=40) (actual time=0.049..27.375 rows=5,008 loops=1)

  • Output: pi_1.id, pi_1.amount, pi_1.amountshipping, pi_1.date, pi_1.number, pi_1.project_id
  • Filter: (((pi_1.status)::text = 'READY'::text) AND (pi_1.date >= (COALESCE(get_session_var('startdate'::character varying), '190 (...)
  • Rows Removed by Filter: 144
218. 0.012 0.016 ↑ 2.0 3 1

Hash (cost=1.06..1.06 rows=6 width=20) (actual time=0.016..0.016 rows=3 loops=1)

  • Output: pois_2.amount, pois_2.purchaseinvoiceitem_id, pois_2.project_id, pois_2.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
219. 0.004 0.004 ↑ 1.0 6 1

Seq Scan on public.purchaseorderitemsplit pois_2 (cost=0.00..1.06 rows=6 width=20) (actual time=0.003..0.004 rows=6 loops=1)

  • Output: pois_2.amount, pois_2.purchaseinvoiceitem_id, pois_2.project_id, pois_2.id
220. 1.225 6.087 ↓ 4.0 6,288 1

Hash (cost=579.32..579.32 rows=1,572 width=13) (actual time=6.087..6.087 rows=6,288 loops=1)

  • Output: p_15.tenant_id, p_15.id, p_15.costunit_id, c_7.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Buckets: 8,192 (originally 2048) Batches: 1 (originally 1) Memory Usage: 317kB
221. 3.683 4.862 ↓ 4.0 6,288 1

Hash Join (cost=2.14..579.32 rows=1,572 width=13) (actual time=0.066..4.862 rows=6,288 loops=1)

  • Output: p_15.tenant_id, p_15.id, p_15.costunit_id, c_7.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Hash Cond: (p_15.tenant_id = t_7.id)
222. 1.124 1.124 ↑ 1.0 6,288 1

Seq Scan on public.project p_15 (cost=0.00..537.88 rows=6,288 width=12) (actual time=0.002..1.124 rows=6,288 loops=1)

  • Output: p_15.id, p_15.createddate, p_15.deliverydate, p_15.description, p_15.modifieddate, p_15.number, p_15.recordstatus, p_15.versio (...)
223. 0.006 0.055 ↓ 4.0 4 1

Hash (cost=2.13..2.13 rows=1 width=5) (actual time=0.055..0.055 rows=4 loops=1)

  • Output: t_7.id, c_7.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
224. 0.022 0.049 ↓ 4.0 4 1

Nested Loop (cost=0.00..2.13 rows=1 width=5) (actual time=0.018..0.049 rows=4 loops=1)

  • Output: t_7.id, c_7.ignorepurchaseinvoicesoncomponentswithstockbookings
  • Join Filter: (t_7.configuration_id = c_7.id)
  • Rows Removed by Join Filter: 12
225. 0.023 0.023 ↓ 4.0 4 1

Seq Scan on public.configuration c_7 (cost=0.00..1.04 rows=1 width=5) (actual time=0.010..0.023 rows=4 loops=1)

  • Output: c_7.id, c_7.createddate, c_7.defaultlettertemplate, c_7.modifieddate, c_7.number, c_7.recordstatus, c_7.createdby_ (...)
  • Filter: (c_7.useinvoicesforprojectcalculation AND (NOT c_7.onlyusebookedcomponentsforprojectcalculation))
226. 0.004 0.004 ↑ 1.0 4 4

Seq Scan on public.tenant t_7 (cost=0.00..1.04 rows=4 width=8) (actual time=0.000..0.001 rows=4 loops=4)

  • Output: t_7.id, t_7.loginpossible, t_7.name, t_7.number, t_7.region_id, t_7.country_id, t_7.recordstatus, t_7.createddate, (...)
227. 23.604 23.604 ↑ 1.0 1 11,802

Index Scan using projectcomponent_pkey on public.projectcomponent pc_8 (cost=0.29..0.82 rows=1 width=454) (actual time=0.001..0.002 rows=1 loops=11,802)

  • Output: pc_8.tenant_id, pc_8.id, pc_8.project_id, pc_8.projectpart_id, pc_8.external, pc_8.extrawork, pc_8.*, pc_8.bookedquantity
  • Index Cond: (pc_8.id = pii_2.projectcomponent_id)
  • Filter: ((NOT pc_8.preliminary) AND (pc_8.recordstatus <> 'X'::recordstatus))
  • Rows Removed by Filter: 0
228. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_costunit_displayname on public.costunit cu_7 (cost=0.14..0.15 rows=1 width=304) (never executed)

  • Output: cu_7.id, cu_7.createddate, cu_7.description, cu_7.modifieddate, cu_7.name, cu_7.number, cu_7.recordstatus, cu_7.createdby_id, cu_7.modifiedby_id, cu_7 (...)
  • Index Cond: (cu_7.id = p_15.costunit_id)
229. 0.001 10.437 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3_1 (cost=2,026.87..2,026.91 rows=1 width=384) (actual time=10.437..10.437 rows=0 loops=1)

  • Output: "*SELECT* 3_1".project_id, "*SELECT* 3_1".projectpart_id, "*SELECT* 3_1".costunit_id, "*SELECT* 3_1".costunit_name, "*SELECT* 3_1".costunit_number, "*SELECT* 3_1".tenan (...)
230. 0.002 10.436 ↓ 0.0 0 1

HashAggregate (cost=2,026.87..2,026.90 rows=1 width=384) (actual time=10.436..10.436 rows=0 loops=1)

  • Output: COALESCE(pc_9.project_id, p_16.id), pc_9.projectpart_id, cu_8.id, cu_8.name, cu_8.number, (COALESCE(pc_9.tenant_id, p_16.tenant_id)), roundedsum2(CASE WHEN ((pc_9 (...)
  • Group Key: p_16.id, cu_8.id, cu_8.name, cu_8.number, COALESCE(pc_9.tenant_id, p_16.tenant_id), po_1.id, poi_2.positionnumber, pc_9.id
231. 0.000 10.434 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.86..2,026.77 rows=1 width=384) (actual time=10.434..10.434 rows=0 loops=1)

  • Output: cu_8.id, cu_8.name, cu_8.number, COALESCE(pc_9.tenant_id, p_16.tenant_id), p_16.id, po_1.id, poi_2.positionnumber, pc_9.id, pc_9.project_id, pc_9.projectpar (...)
  • Join Filter: (cu_8.id = p_16.costunit_id)
232. 0.001 10.434 ↓ 0.0 0 1

Nested Loop (cost=0.86..2,025.41 rows=1 width=84) (actual time=10.434..10.434 rows=0 loops=1)

  • Output: po_1.id, po_1.amount, po_1.freighttotal, po_1.date, po_1.number, poi_2.positionnumber, poi_2.amount, pois_3.amount, p_16.tenant_id, p_16.id, p_16.cost (...)
  • Join Filter: (((pc_9.* IS NULL) OR (pc_9.bookedquantity = '0'::double precision) OR (NOT c_8.ignorepurchaseinvoicesoncomponentswithstockbookings)) AND (t_8.co (...)
233. 0.000 10.433 ↓ 0.0 0 1

Nested Loop (cost=0.86..2,024.36 rows=1 width=524) (actual time=10.433..10.433 rows=0 loops=1)

  • Output: po_1.id, po_1.amount, po_1.freighttotal, po_1.date, po_1.number, poi_2.positionnumber, poi_2.amount, pois_3.amount, p_16.tenant_id, p_16.id, p_1 (...)
  • Join Filter: (p_16.tenant_id = t_8.id)
234. 0.119 10.433 ↓ 0.0 0 1

Nested Loop (cost=0.86..2,023.27 rows=1 width=520) (actual time=10.433..10.433 rows=0 loops=1)

  • Output: po_1.id, po_1.amount, po_1.freighttotal, po_1.date, po_1.number, poi_2.positionnumber, poi_2.amount, pois_3.amount, p_16.tenant_id, p_16.i (...)
  • Join Filter: (COALESCE(pc_9.project_id, p_16.id) = 6,583)
  • Rows Removed by Join Filter: 229
235. 0.920 10.082 ↓ 33.1 232 1

Nested Loop Left Join (cost=0.57..1,965.08 rows=7 width=516) (actual time=0.463..10.082 rows=232 loops=1)

  • Output: po_1.id, po_1.amount, po_1.freighttotal, po_1.date, po_1.number, poi_2.positionnumber, poi_2.amount, poi_2.project_id, pois_3.amount (...)
  • Join Filter: (pois_3.id IS NULL)
  • Filter: (pc_9.projectpart_id IS NULL)
  • Rows Removed by Filter: 160
  • -> Index Scan using projectcomponent_pkey on public.projectcomponent pc_9 (cost=0.29..2.81 rows=1 width=454) (actual time=0.002..0.002 row (...)
236. 0.296 9.162 ↓ 15.1 392 1

Nested Loop Left Join (cost=0.29..1,891.83 rows=26 width=70) (actual time=0.356..9.162 rows=392 loops=1)

  • Output: po_1.id, po_1.amount, po_1.freighttotal, po_1.date, po_1.number, poi_2.positionnumber, poi_2.amount, poi_2.project_id, poi_2.p (...)
  • Join Filter: (pois_3.purchaseorderitem_id = poi_2.id)
  • Rows Removed by Join Filter: 2,352
  • Output: pc_9.tenant_id, pc_9.id, pc_9.project_id, pc_9.projectpart_id, pc_9.external, pc_9.extrawork, pc_9.*, pc_9.bookedquantity
  • Index Cond: (pc_9.id = poi_2.projectcomponent_id)
  • Filter: ((NOT pc_9.preliminary) AND (pc_9.recordstatus <> 'X'::recordstatus))
237. 1.308 8.866 ↓ 15.1 392 1

Nested Loop (cost=0.29..1,888.41 rows=26 width=58) (actual time=0.343..8.866 rows=392 loops=1)

  • Output: po_1.id, po_1.amount, po_1.freighttotal, po_1.date, po_1.number, poi_2.positionnumber, poi_2.amount, poi_2.id, poi_2.pro (...)
  • -> Index Scan using idx_purchaseorderitem_purchaseorder_id on public.purchaseorderitem poi_2 (cost=0.29..6.22 rows=1 width=26) (...)
238. 7.558 7.558 ↓ 4.0 331 1

Seq Scan on public.purchaseorder po_1 (cost=0.00..1,371.61 rows=83 width=36) (actual time=0.327..7.558 rows=331 loops=1)

  • Output: po_1.id, po_1.amount, po_1.number, po_1.supplier_id, po_1.currency_id, po_1.tenant_id, po_1.deliveryaddress_id, po (...)
  • Filter: (((po_1.status)::text = 'READY'::text) AND (po_1.date >= (COALESCE(get_session_var('startdate'::character varying) (...)
  • Rows Removed by Filter: 6,633
  • Output: poi_2.id, poi_2.confirmeddate, poi_2.desireddate, poi_2.billedamount, poi_2.lastdeliverydate, poi_2."position", po (...)
  • Index Cond: (poi_2.purchaseorder_id = po_1.id)
  • Filter: ((poi_2.recordstatus <> 'X'::recordstatus) AND ((poi_2.status)::text <> ALL ('{ENTRY,CANCELLED}'::text[])) AND (po (...)
  • Rows Removed by Filter: 0
239. 0.000 0.000 ↑ 1.0 6 392

Materialize (cost=0.00..1.09 rows=6 width=20) (actual time=0.000..0.000 rows=6 loops=392)

  • Output: pois_3.amount, pois_3.purchaseorderitem_id, pois_3.project_id, pois_3.id
  • -> Seq Scan on public.purchaseorderitemsplit pois_3 (cost=0.00..1.06 rows=6 width=20) (actual time=0.002..0.003 rows=6 loops=1 (...)
  • Output: pois_3.amount, pois_3.purchaseorderitem_id, pois_3.project_id, pois_3.id
240. 0.232 0.232 ↑ 1.0 1 232

Index Scan using project_pkey on public.project p_16 (cost=0.28..8.30 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=232)

  • Output: p_16.id, p_16.createddate, p_16.deliverydate, p_16.description, p_16.modifieddate, p_16.number, p_16.recordstatus, p_16.version, p_1 (...)
  • Index Cond: (p_16.id = COALESCE(pois_3.project_id, poi_2.project_id))
241. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.tenant t_8 (cost=0.00..1.04 rows=4 width=8) (never executed)

  • Output: t_8.id, t_8.loginpossible, t_8.name, t_8.number, t_8.region_id, t_8.country_id, t_8.recordstatus, t_8.createddate, t_8.modifieddate, t_8.m (...)
242. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.configuration c_8 (cost=0.00..1.04 rows=1 width=5) (never executed)

  • Output: c_8.id, c_8.createddate, c_8.defaultlettertemplate, c_8.modifieddate, c_8.number, c_8.recordstatus, c_8.createdby_id, c_8.modifiedby_id, c_8.boo (...)
  • Filter: (c_8.useinvoicesforprojectcalculation AND c_8.useinvoicesorordersforprojectcalculation AND (NOT c_8.onlyusebookedcomponentsforprojectcalculation (...)
243. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.costunit cu_8 (cost=0.00..1.16 rows=16 width=304) (never executed)

  • Output: cu_8.id, cu_8.createddate, cu_8.description, cu_8.modifieddate, cu_8.name, cu_8.number, cu_8.recordstatus, cu_8.createdby_id, cu_8.modifiedby_id, cu_8 (...)
244. 0.000 0.024 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4_1 (cost=1,722.60..1,722.62 rows=1 width=342) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: "*SELECT* 4_1".project_id, "*SELECT* 4_1".projectpart_id, "*SELECT* 4_1".costunit_id, "*SELECT* 4_1".costunit_name, "*SELECT* 4_1".costunit_number, "*SELECT* 4_1".tenan (...)
245. 0.001 0.024 ↓ 0.0 0 1

HashAggregate (cost=1,722.60..1,722.61 rows=1 width=342) (actual time=0.024..0.024 rows=0 loops=1)

  • Output: pc_10.project_id, pc_10.projectpart_id, cu_9.id, cu_9.name, cu_9.number, pc_10.tenant_id, CASE WHEN (NOT pc_10.external) THEN pc_10.amount ELSE '0'::double precis (...)
  • Group Key: pc_10.id, cu_9.id, p_17.id, pa_8.id
246. 0.001 0.023 ↓ 0.0 0 1

Nested Loop (cost=14.74..1,722.59 rows=1 width=342) (actual time=0.023..0.023 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, pc_10.orderdate, p_17.id, cu_9.id, cu_9.na (...)
  • Join Filter: (CASE WHEN c_9.useinvoicesorordersforprojectcalculation THEN (poi_3.id IS NULL) ELSE true END AND (t_9.configuration_id = c_9.id))
247. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=14.74..1,721.53 rows=1 width=350) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, pc_10.orderdate, poi_3.id, p_17.id, (...)
  • Join Filter: (p_17.tenant_id = t_9.id)
248. 0.000 0.022 ↓ 0.0 0 1

Nested Loop Left Join (cost=14.74..1,720.44 rows=1 width=350) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, pc_10.orderdate, poi_3.id, p_1 (...)
249. 0.001 0.022 ↓ 0.0 0 1

Nested Loop Left Join (cost=14.32..1,712.00 rows=1 width=350) (actual time=0.022..0.022 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, pc_10.orderdate, pc_10.p (...)
  • Join Filter: (cu_9.id = p_17.costunit_id)
250. 0.000 0.021 ↓ 0.0 0 1

Nested Loop (cost=14.32..1,710.64 rows=1 width=50) (actual time=0.021..0.021 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, pc_10.orderdate, p (...)
251. 0.000 0.021 ↓ 0.0 0 1

Nested Loop Left Join (cost=14.04..1,702.33 rows=1 width=38) (actual time=0.021..0.021 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, pc_10.orderd (...)
  • Filter: (pii_3.id IS NULL)
  • -> Index Scan using idx_purchaseinvoiceitem_projectcomponent on public.purchaseinvoiceitem pii_3 (cost=0.29..8.31 rows=1 width=12) ( (...)
252. 0.017 0.021 ↓ 0.0 0 1

Hash Right Join (cost=13.76..1,694.01 rows=1 width=38) (actual time=0.021..0.021 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, pc_10. (...)
  • Hash Cond: (poi_3.projectcomponent_id = pc_10.id)
  • Output: pii_3.id, pii_3.description, pii_3."position", pii_3.quantity, pii_3.version, pii_3.unit_id, pii_3.amount, pii_3.amountw (...)
  • Index Cond: (pc_10.id = pii_3.projectcomponent_id)
  • Filter: ((pii_3.status)::text <> ALL ('{ENTRY,CANCELLED}'::text[]))
253. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.purchaseorderitem poi_3 (cost=0.00..1,632.32 rows=12,781 width=8) (never executed)

  • Output: poi_3.id, poi_3.confirmeddate, poi_3.desireddate, poi_3.billedamount, poi_3.lastdeliverydate, poi_3."position", po (...)
  • Filter: (((poi_3.status)::text <> ALL ('{ENTRY,CANCELLED}'::text[])) AND (poi_3.recordstatus <> 'X'::recordstatus))
254. 0.004 0.004 ↓ 0.0 0 1

Hash (cost=13.74..13.74 rows=1 width=34) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extrawork, (...)
  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • -> Index Scan using idx_projectcomponent_project_id on public.projectcomponent pc_10 (cost=0.29..13.74 rows=1 width=34) (...)
  • Output: pc_10.id, pc_10.project_id, pc_10.projectpart_id, pc_10.tenant_id, pc_10.external, pc_10.amount, pc_10.extra (...)
  • Index Cond: (pc_10.project_id = 6,583)
  • Filter: ((NOT pc_10.preliminary) AND (pc_10.projectpart_id IS NULL) AND (pc_10.recordstatus <> 'X'::recordstatus) AN (...)
255. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pkey on public.project p_17 (cost=0.28..8.30 rows=1 width=12) (never executed)

  • Output: p_17.id, p_17.createddate, p_17.deliverydate, p_17.description, p_17.modifieddate, p_17.number, p_17.recordstatus, p_17.versio (...)
  • Index Cond: (p_17.id = 6,583)
256. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.costunit cu_9 (cost=0.00..1.16 rows=16 width=304) (never executed)

  • Output: cu_9.id, cu_9.createddate, cu_9.description, cu_9.modifieddate, cu_9.name, cu_9.number, cu_9.recordstatus, cu_9.createdby_id, cu_9.m (...)
257. 0.000 0.000 ↓ 0.0 0

Index Only Scan using projectactivity_pkey on public.projectactivity pa_8 (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Output: pa_8.id
  • Index Cond: (pa_8.id = pc_10.projectactivity_id)
  • Heap Fetches: 0
258. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.tenant t_9 (cost=0.00..1.04 rows=4 width=8) (never executed)

  • Output: t_9.id, t_9.loginpossible, t_9.name, t_9.number, t_9.region_id, t_9.country_id, t_9.recordstatus, t_9.createddate, t_9.modifieddate, t_9.modifie (...)
259. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.configuration c_9 (cost=0.00..1.04 rows=1 width=5) (never executed)

  • Output: c_9.id, c_9.createddate, c_9.defaultlettertemplate, c_9.modifieddate, c_9.number, c_9.recordstatus, c_9.createdby_id, c_9.modifiedby_id, c_9.bookoutgo (...)
  • Filter: (c_9.useprojectcomponentswithoutinvoiceforcalculation AND c_9.useinvoicesforprojectcalculation AND (NOT c_9.onlyusebookedcomponentsforprojectcalculati (...)
260. 0.000 0.004 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5_1 (cost=42.30..42.32 rows=1 width=342) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: "*SELECT* 5_1".project_id, "*SELECT* 5_1".projectpart_id, "*SELECT* 5_1".costunit_id, "*SELECT* 5_1".costunit_name, "*SELECT* 5_1".costunit_number, "*SELECT* 5_1".tenan (...)
261. 0.001 0.004 ↓ 0.0 0 1

HashAggregate (cost=42.30..42.31 rows=1 width=342) (actual time=0.004..0.004 rows=0 loops=1)

  • Output: pc_11.project_id, pc_11.projectpart_id, cu_10.id, cu_10.name, cu_10.number, pc_11.tenant_id, CASE WHEN (NOT pc_11.external) THEN pc_11.amount ELSE '0'::double pre (...)
  • Group Key: pc_11.id, cu_10.id, p_18.id, pa_9.id
262. 0.000 0.003 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.27..42.29 rows=1 width=342) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: pc_11.id, pc_11.project_id, pc_11.projectpart_id, pc_11.tenant_id, pc_11.external, pc_11.amount, pc_11.extrawork, pc_11.orderdate, p_18.id, cu_10.id, cu_10. (...)
263. 0.000 0.003 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.85..33.84 rows=1 width=342) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: pc_11.id, pc_11.project_id, pc_11.projectpart_id, pc_11.tenant_id, pc_11.external, pc_11.amount, pc_11.extrawork, pc_11.orderdate, pc_11.projectactivi (...)
  • Join Filter: (cu_10.id = p_18.costunit_id)
264. 0.001 0.003 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.85..32.48 rows=1 width=42) (actual time=0.003..0.003 rows=0 loops=1)

  • Output: pc_11.id, pc_11.project_id, pc_11.projectpart_id, pc_11.tenant_id, pc_11.external, pc_11.amount, pc_11.extrawork, pc_11.orderdate, pc_11.project (...)
  • Filter: ((art_2.id IS NULL) OR (NOT art_2.storedinwarehouse))
265. 0.000 0.002 ↓ 0.0 0 1

Nested Loop (cost=0.57..24.17 rows=1 width=46) (actual time=0.002..0.002 rows=0 loops=1)

  • Output: pc_11.id, pc_11.project_id, pc_11.projectpart_id, pc_11.tenant_id, pc_11.external, pc_11.amount, pc_11.extrawork, pc_11.orderdate, pc_11.a (...)
  • Join Filter: (t_10.configuration_id = c_10.id)
266. 0.000 0.002 ↓ 0.0 0 1

Nested Loop (cost=0.57..23.12 rows=1 width=50) (actual time=0.002..0.002 rows=0 loops=1)

  • Output: pc_11.id, pc_11.project_id, pc_11.projectpart_id, pc_11.tenant_id, pc_11.external, pc_11.amount, pc_11.extrawork, pc_11.orderdate, p (...)
  • Join Filter: (p_18.tenant_id = t_10.id)
267. 0.002 0.002 ↓ 0.0 0 1

Nested Loop (cost=0.57..22.03 rows=1 width=50) (actual time=0.002..0.002 rows=0 loops=1)

  • Output: pc_11.id, pc_11.project_id, pc_11.projectpart_id, pc_11.tenant_id, pc_11.external, pc_11.amount, pc_11.extrawork, pc_11.orderd (...)
  • -> Index Scan using idx_projectcomponent_project_id on public.projectcomponent pc_11 (cost=0.29..13.72 rows=1 width=38) (actual time (...)
  • Output: pc_11.id, pc_11.amount, pc_11.createddate, pc_11.finisheddimensions, pc_11.modifieddate, pc_11.recordstatus, pc_11.versi (...)
  • Index Cond: (pc_11.project_id = 6,583)
  • Filter: ((NOT pc_11.preliminary) AND (pc_11.projectpart_id IS NULL) AND (pc_11.recordstatus <> 'X'::recordstatus) AND COALESCE(( (...)
268. 0.000 0.000 ↓ 0.0 0

Index Scan using project_pkey on public.project p_18 (cost=0.28..8.30 rows=1 width=12) (never executed)

  • Output: p_18.id, p_18.createddate, p_18.deliverydate, p_18.description, p_18.modifieddate, p_18.number, p_18.recordstatus, p_18. (...)
  • Index Cond: (p_18.id = 6,583)
269. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.tenant t_10 (cost=0.00..1.04 rows=4 width=8) (never executed)

  • Output: t_10.id, t_10.loginpossible, t_10.name, t_10.number, t_10.region_id, t_10.country_id, t_10.recordstatus, t_10.createddate, t_1 (...)
270. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.configuration c_10 (cost=0.00..1.04 rows=1 width=4) (never executed)

  • Output: c_10.id, c_10.createddate, c_10.defaultlettertemplate, c_10.modifieddate, c_10.number, c_10.recordstatus, c_10.createdby_id, c_10.mo (...)
  • Filter: ((NOT c_10.useinvoicesforprojectcalculation) AND c_10.onlyusebookedcomponentsforprojectcalculation)
271. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_article_displayname on public.article art_2 (cost=0.28..8.30 rows=1 width=5) (never executed)

  • Output: art_2.id, art_2.buyproduct, art_2.coefficient, art_2.ean, art_2.name, art_2.number, art_2.numberforvendor, art_2.ownproduct, art_2.replace (...)
  • Index Cond: (art_2.id = pc_11.article_id)
272. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.costunit cu_10 (cost=0.00..1.16 rows=16 width=304) (never executed)

  • Output: cu_10.id, cu_10.createddate, cu_10.description, cu_10.modifieddate, cu_10.name, cu_10.number, cu_10.recordstatus, cu_10.createdby_id, cu_10.modi (...)
273. 0.000 0.000 ↓ 0.0 0

Index Only Scan using projectactivity_pkey on public.projectactivity pa_9 (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Output: pa_9.id
  • Index Cond: (pa_9.id = pc_11.projectactivity_id)
  • Heap Fetches: 0
274. 0.001 49.641 ↓ 0.0 0 1

Subquery Scan on *SELECT* 6_1 (cost=2,938.60..2,938.63 rows=1 width=385) (actual time=49.641..49.641 rows=0 loops=1)

  • Output: "*SELECT* 6_1".project_id, "*SELECT* 6_1".projectpart_id, "*SELECT* 6_1".costunit_id, "*SELECT* 6_1".costunit_name, "*SELECT* 6_1".costunit_number, "*SELECT* 6_1".tenant_id, "*SELE (...)
275. 0.001 49.640 ↓ 0.0 0 1

HashAggregate (cost=2,938.60..2,938.62 rows=1 width=385) (actual time=49.640..49.640 rows=0 loops=1)

  • Output: (COALESCE(p_19.id, pc_12.project_id)), pc_12.projectpart_id, cu_11.id, cu_11.name, cu_11.number, sb_3.tenant_id, roundedsum2(CASE WHEN COALESCE((NOT pc_12.external), true) TH (...)
  • Group Key: COALESCE(p_19.id, pc_12.project_id), pc_12.id, cu_11.id, sb_3.tenant_id, sb_3.date
276. 0.001 49.639 ↓ 0.0 0 1

Nested Loop Left Join (cost=630.96..2,938.46 rows=1 width=385) (actual time=49.639..49.639 rows=0 loops=1)

  • Output: COALESCE(p_19.id, pc_12.project_id), cu_11.id, sb_3.tenant_id, sb_3.date, pc_12.id, pc_12.projectpart_id, cu_11.name, cu_11.number, pc_12.external, sb_3.projectpart_id, (...)
277. 0.001 49.638 ↓ 0.0 0 1

Nested Loop (cost=630.83..2,938.29 rows=1 width=85) (actual time=49.638..49.638 rows=0 loops=1)

  • Output: sb_3.tenant_id, sb_3.date, sb_3.projectpart_id, sb_3.type, sb_3.valuedelta, sb_3.quantitydelta, sb_3.costunit_id, p_19.id, pc_13.id, pc_13.priceperunit, art_3.val (...)
  • Join Filter: (t_11.configuration_id = c_11.id)
278. 0.000 49.637 ↓ 0.0 0 1

Nested Loop (cost=630.83..2,937.20 rows=1 width=86) (actual time=49.637..49.637 rows=0 loops=1)

  • Output: sb_3.tenant_id, sb_3.date, sb_3.projectpart_id, sb_3.type, sb_3.valuedelta, sb_3.quantitydelta, sb_3.costunit_id, p_19.id, pc_13.id, pc_13.priceperunit, art (...)
279. 0.001 49.637 ↓ 0.0 0 1

Nested Loop Left Join (cost=630.70..2,937.04 rows=1 width=82) (actual time=49.637..49.637 rows=0 loops=1)

  • Output: sb_3.tenant_id, sb_3.date, sb_3.projectpart_id, sb_3.type, sb_3.valuedelta, sb_3.quantitydelta, sb_3.costunit_id, p_19.id, pc_13.id, pc_13.priceperuni (...)
280. 2.426 49.636 ↓ 0.0 0 1

Nested Loop Left Join (cost=630.42..2,936.68 rows=1 width=70) (actual time=49.636..49.636 rows=0 loops=1)

  • Output: sb_3.tenant_id, sb_3.date, sb_3.projectpart_id, sb_3.type, sb_3.valuedelta, sb_3.quantitydelta, sb_3.costunit_id, p_19.id, pc_13.id, pc_13.price (...)
  • Filter: ((pc_12.projectpart_id IS NULL) AND (COALESCE(p_19.id, pc_12.project_id) = 6,583))
  • Rows Removed by Filter: 1,472
  • -> Index Scan using projectcomponent_pkey on public.projectcomponent pc_12 (cost=0.29..0.44 rows=1 width=14) (actual time=0.001..0.001 rows=1 loops=14 (...)
281. 3.473 47.210 ↓ 3.9 1,472 1

Nested Loop Left Join (cost=630.13..2,766.79 rows=377 width=56) (actual time=4.677..47.210 rows=1,472 loops=1)

  • Output: sb_3.tenant_id, sb_3.date, sb_3.projectpart_id, sb_3.type, sb_3.valuedelta, sb_3.quantitydelta, sb_3.costunit_id, p_19.id, pc_13.id, pc_13 (...)
  • -> Index Scan using projectcomponent_pkey on public.projectcomponent pc_13 (cost=0.29..2.26 rows=1 width=16) (actual time=0.002..0.002 rows=1 lo (...)
  • Output: pc_12.id, pc_12.amount, pc_12.createddate, pc_12.finisheddimensions, pc_12.modifieddate, pc_12.recordstatus, pc_12.version, pc_12.article_ (...)
  • Index Cond: (pc_12.id = pc_13.id)
282. 1.479 43.737 ↓ 3.9 1,472 1

Hash Join (cost=629.84..1,911.03 rows=377 width=44) (actual time=4.669..43.737 rows=1,472 loops=1)

  • Output: sb_3.tenant_id, sb_3.date, sb_3.projectpart_id, sb_3.type, sb_3.valuedelta, sb_3.quantitydelta, sb_3.projectcomponent_id, sb_3.costu (...)
  • Hash Cond: (sb_3.project_id = p_19.id)
  • Output: pc_13.id, pc_13.amount, pc_13.createddate, pc_13.finisheddimensions, pc_13.modifieddate, pc_13.recordstatus, pc_13.version, pc_13.ar (...)
  • Index Cond: (pc_13.id = sb_3.projectcomponent_id)
  • Filter: (pc_13.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 0
283. 39.792 39.792 ↓ 4.0 12,455 1

Seq Scan on public.stockbooking sb_3 (cost=0.00..1,265.75 rows=3,114 width=44) (actual time=0.016..39.792 rows=12,455 loops=1)

  • Output: sb_3.id, sb_3.quantity, sb_3.stock_id, sb_3.counterbooking_id, sb_3.importeddate, sb_3.number, sb_3.article_id, sb_3.unit_id, (...)
  • Filter: ((sb_3.date >= (COALESCE(get_session_var('startdate'::character varying), '1900-01-01'::character varying))::date) AND (sb_3.d (...)
284. 0.733 2.466 ↑ 1.0 6,099 1

Hash (cost=553.60..553.60 rows=6,099 width=4) (actual time=2.466..2.466 rows=6,099 loops=1)

  • Output: p_19.id
  • Buckets: 8,192 Batches: 1 Memory Usage: 279kB
285. 1.733 1.733 ↑ 1.0 6,099 1

Seq Scan on public.project p_19 (cost=0.00..553.60 rows=6,099 width=4) (actual time=0.004..1.733 rows=6,099 loops=1)

  • Output: p_19.id
  • Filter: (p_19.recordstatus <> 'X'::recordstatus)
  • Rows Removed by Filter: 189
286. 0.000 0.000 ↓ 0.0 0

Index Scan using article_pkey on public.article art_3 (cost=0.28..0.35 rows=1 width=20) (never executed)

  • Output: art_3.id, art_3.buyproduct, art_3.coefficient, art_3.ean, art_3.name, art_3.number, art_3.numberforvendor, art_3.ownproduct, art_3.replacementti (...)
  • Index Cond: (art_3.id = pc_13.article_id)
287. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_tenant_displayname on public.tenant t_11 (cost=0.13..0.15 rows=1 width=8) (never executed)

  • Output: t_11.id, t_11.loginpossible, t_11.name, t_11.number, t_11.region_id, t_11.country_id, t_11.recordstatus, t_11.createddate, t_11.modifieddate, t_11.mod (...)
  • Index Cond: (t_11.id = sb_3.tenant_id)
288. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.configuration c_11 (cost=0.00..1.04 rows=4 width=7) (never executed)

  • Output: c_11.id, c_11.createddate, c_11.defaultlettertemplate, c_11.modifieddate, c_11.number, c_11.recordstatus, c_11.createdby_id, c_11.modifiedby_id, c_11.bookou (...)
289. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_costunit_displayname on public.costunit cu_11 (cost=0.14..0.16 rows=1 width=304) (never executed)

  • Output: cu_11.id, cu_11.createddate, cu_11.description, cu_11.modifieddate, cu_11.name, cu_11.number, cu_11.recordstatus, cu_11.createdby_id, cu_11.modifiedby_id, cu_11.t (...)
  • Index Cond: (cu_11.id = sb_3.costunit_id)
290. 0.015 0.015 ↓ 0.0 0 3

Index Scan using projectpart_pkey on public.projectpart pp (cost=0.29..8.31 rows=1 width=58) (actual time=0.005..0.005 rows=0 loops=3)

  • Output: pp.id, pp.amount, pp.comment, pp.createddate, pp.modifieddate, pp.name, pp."position", pp.recordstatus, pp.version, pp.createdby_id, pp.modifiedby_id, pp.project_id, pp.tenant_id, pp.preliminary, pp.componentco (...)
  • Index Cond: (pp.id = "*SELECT* 1".projectpart_id)
291. 0.023 0.045 ↑ 1.0 79 1

Hash (cost=7.79..7.79 rows=79 width=26) (actual time=0.045..0.045 rows=79 loops=1)

  • Output: act.number, act.name, act.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
292. 0.022 0.022 ↑ 1.0 79 1

Seq Scan on public.activity act (cost=0.00..7.79 rows=79 width=26) (actual time=0.004..0.022 rows=79 loops=1)

  • Output: act.number, act.name, act.id
293. 0.005 0.023 ↑ 1.0 14 1

Hash (cost=1.14..1.14 rows=14 width=638) (actual time=0.023..0.023 rows=14 loops=1)

  • Output: pg.number, pg.name, pg.id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
294. 0.018 0.018 ↑ 1.0 14 1

Seq Scan on public.projectgroup pg (cost=0.00..1.14 rows=14 width=638) (actual time=0.017..0.018 rows=14 loops=1)

  • Output: pg.number, pg.name, pg.id
295. 0.042 0.042 ↓ 0.0 0 3

Index Only Scan using idx_unit_displayname on public.unit (cost=0.14..0.16 rows=1 width=12) (actual time=0.014..0.014 rows=0 loops=3)

  • Output: unit.id, unit.name
  • Index Cond: (unit.id = pp.unit_id)
  • Heap Fetches: 1
Planning time : 99.431 ms
Execution time : 5,251.406 ms