explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9KmQ : review1 db (no where clause)

Settings
# exclusive inclusive rows x rows loops node
1. 18.587 5,070.498 ↓ 2.0 400 1

GroupAggregate (cost=11,669,337.24..11,669,349.58 rows=200 width=556) (actual time=5,034.147..5,070.498 rows=400 loops=1)

  • Group Key: "*SELECT* 1"."productCategoryId", "*SELECT* 1"."productCategoryName", "*SELECT* 1".year, "*SELECT* 1".month
  • Buffers: shared hit=1,192,149 read=37, temp read=3,303 written=3,305
2. 241.579 5,051.911 ↓ 161.5 95,473 1

Sort (cost=11,669,337.24..11,669,338.72 rows=591 width=556) (actual time=5,034.053..5,051.911 rows=95,473 loops=1)

  • Sort Key: "*SELECT* 1"."productCategoryId", "*SELECT* 1"."productCategoryName", "*SELECT* 1".month
  • Sort Method: external merge Disk: 5,544kB
  • Buffers: shared hit=1,192,149 read=37, temp read=3,303 written=3,305
3. 10.500 4,810.332 ↓ 161.5 95,473 1

Append (cost=5,814,678.19..11,669,310.03 rows=591 width=556) (actual time=837.957..4,810.332 rows=95,473 loops=1)

  • Buffers: shared hit=1,192,146 read=37, temp read=2,610 written=2,611
4. 12.563 1,155.048 ↓ 153.8 86,885 1

Subquery Scan on *SELECT* 1 (cost=5,814,678.19..5,819,173.44 rows=565 width=556) (actual time=837.957..1,155.048 rows=86,885 loops=1)

  • Buffers: shared hit=427,773, temp read=1,733 written=1,732
5. 62.108 1,142.485 ↓ 153.8 86,885 1

Hash Join (cost=5,814,678.19..5,819,167.79 rows=565 width=6,696) (actual time=837.955..1,142.485 rows=86,885 loops=1)

  • Hash Cond: (p."marketingFocusId" = mf.id)
  • Buffers: shared hit=427,773, temp read=1,733 written=1,732
6. 21.040 1,080.363 ↓ 153.8 86,885 1

Hash Join (cost=5,814,665.04..5,819,141.81 rows=565 width=624) (actual time=837.917..1,080.363 rows=86,885 loops=1)

  • Hash Cond: (p."marketingManagedId" = mm.id)
  • Buffers: shared hit=427,772, temp read=1,733 written=1,732
7. 20.270 1,059.315 ↓ 153.8 86,885 1

Hash Join (cost=5,814,651.89..5,819,127.13 rows=565 width=640) (actual time=837.902..1,059.315 rows=86,885 loops=1)

  • Hash Cond: (p."demographicId" = d.id)
  • Buffers: shared hit=427,771, temp read=1,733 written=1,732
8. 21.561 1,039.036 ↓ 153.8 86,885 1

Hash Join (cost=5,814,638.74..5,819,112.46 rows=565 width=656) (actual time=837.884..1,039.036 rows=86,885 loops=1)

  • Hash Cond: (p."formId" = f.id)
  • Buffers: shared hit=427,770, temp read=1,733 written=1,732
9. 13.337 1,017.464 ↓ 153.8 86,885 1

Nested Loop (cost=5,814,625.59..5,819,097.78 rows=565 width=672) (actual time=837.858..1,017.464 rows=86,885 loops=1)

  • Buffers: shared hit=427,769, temp read=1,733 written=1,732
10. 0.017 0.017 ↑ 1.0 1 1

Index Only Scan using producttype_name_unique on "ProductType" pt (cost=0.14..8.16 rows=1 width=32) (actual time=0.013..0.017 rows=1 loops=1)

  • Index Cond: (name = 'finishedGood'::text)
  • Heap Fetches: 1
  • Buffers: shared hit=2
11. 23.981 1,004.110 ↓ 153.8 86,885 1

Hash Join (cost=5,814,625.45..5,819,083.97 rows=565 width=676) (actual time=837.842..1,004.110 rows=86,885 loops=1)

  • Hash Cond: (p."subBrandId" = sb.id)
  • Buffers: shared hit=427,767, temp read=1,733 written=1,732
12. 23.305 980.051 ↓ 153.8 86,885 1

Hash Join (cost=5,814,608.71..5,819,059.46 rows=565 width=692) (actual time=837.753..980.051 rows=86,885 loops=1)

  • Hash Cond: (mpv."marketId" = m.id)
  • Buffers: shared hit=427,764, temp read=1,733 written=1,732
13. 67.792 956.546 ↓ 153.8 86,885 1

Hash Join (cost=5,814,587.52..5,819,030.50 rows=565 width=704) (actual time=837.541..956.546 rows=86,885 loops=1)

  • Hash Cond: (mpv_1.id = mpv.id)
  • Buffers: shared hit=427,758, temp read=1,733 written=1,732
14. 40.780 809.083 ↑ 1.2 94,087 1

Group (cost=5,813,934.62..5,816,797.42 rows=114,512 width=96) (actual time=757.819..809.083 rows=94,087 loops=1)

  • Group Key: (COALESCE(forecast.year, m_1.year)), (COALESCE(forecast.month, m_1.month)), mpv_1.id, forecast.units, m_1.units
  • Buffers: shared hit=382,399, temp read=1,121 written=1,122
15.          

Initplan (for Group)

16. 0.003 0.024 ↑ 1.0 1 1

Limit (cost=33.55..33.55 rows=1 width=24) (actual time=0.023..0.024 rows=1 loops=1)

  • Buffers: shared hit=1
17. 0.015 0.021 ↑ 1,570.0 1 1

Sort (cost=33.55..37.48 rows=1,570 width=24) (actual time=0.021..0.021 rows=1 loops=1)

  • Sort Key: fi_2."importedAt" DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
18. 0.006 0.006 ↑ 1,570.0 1 1

Seq Scan on "ForecastImport" fi_2 (cost=0.00..25.70 rows=1,570 width=24) (actual time=0.005..0.006 rows=1 loops=1)

  • Buffers: shared hit=1
19. 223.757 768.279 ↑ 1.2 94,087 1

Sort (cost=5,813,901.07..5,814,187.35 rows=114,512 width=38) (actual time=757.809..768.279 rows=94,087 loops=1)

  • Sort Key: (COALESCE(forecast.year, m_1.year)), (COALESCE(forecast.month, m_1.month)), mpv_1.id, forecast.units, m_1.units
  • Sort Method: external sort Disk: 4,488kB
  • Buffers: shared hit=382,399, temp read=1,121 written=1,122
20. 5.846 544.522 ↑ 1.2 94,087 1

Nested Loop (cost=3,210.15..5,801,146.62 rows=114,512 width=38) (actual time=31.739..544.522 rows=94,087 loops=1)

  • Buffers: shared hit=382,399
21. 69.211 162.328 ↓ 1.6 94,087 1

Hash Full Join (cost=3,194.44..4,669,995.51 rows=57,257 width=56) (actual time=31.714..162.328 rows=94,087 loops=1)

  • Hash Cond: ((m_1."marketProductVariantId" = forecast."marketProductVariantId") AND (m_1.month = forecast.month) AND (m_1.year = forecast.year))
  • Filter: ((COALESCE(forecast.year, m_1.year) = 2,020) AND ((COALESCE(forecast.month, m_1.month) = 1) OR (COALESCE(forecast.month, m_1.month) = 2) OR (COALESCE(forecast.month, m_1.month) = 3) OR (COALESCE(forecast.month, m_1.month) = 4) OR (COALESCE(forecast.month, m_1.month) = 5) OR (COALESCE(forecast.month, m_1.month) = 6) OR (COALESCE(forecast.month, m_1.month) = 7) OR (COALESCE(forecast.month, m_1.month) = 8) OR (COALESCE(forecast.month, m_1.month) = 9) OR (COALESCE(forecast.month, m_1.month) = 10) OR (COALESCE(forecast.month, m_1.month) = 11) OR (COALESCE(forecast.month, m_1.month) = 12)))
  • Rows Removed by Filter: 61,287
  • Buffers: shared hit=2,765
22. 41.825 61.465 ↑ 1,570.8 124,880 1

Nested Loop (cost=0.00..2,455,037.42 rows=196,162,080 width=28) (actual time=0.038..61.465 rows=124,880 loops=1)

  • Buffers: shared hit=1,422
23. 19.640 19.640 ↑ 1.0 124,880 1

Seq Scan on "MonthlyMarketProductVariantDemand" m_1 (cost=0.00..2,981.80 rows=124,944 width=28) (actual time=0.034..19.640 rows=124,880 loops=1)

  • Filter: ("forecastImportId" = $0)
  • Buffers: shared hit=1,421
24. 0.000 0.000 ↑ 1,570.0 1 124,880

Materialize (cost=0.00..33.55 rows=1,570 width=0) (actual time=0.000..0.000 rows=1 loops=124,880)

  • Buffers: shared hit=1
25. 0.001 0.001 ↑ 1,570.0 1 1

Seq Scan on "ForecastImport" fi (cost=0.00..25.70 rows=1,570 width=0) (actual time=0.001..0.001 rows=1 loops=1)

  • Buffers: shared hit=1
26. 5.557 31.652 ↓ 51.7 30,500 1

Hash (cost=3,184.12..3,184.12 rows=590 width=28) (actual time=31.652..31.652 rows=30,500 loops=1)

  • Buckets: 32,768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2,044kB
  • Buffers: shared hit=1,343
27. 16.353 26.095 ↓ 51.7 30,500 1

Hash Join (cost=41.75..3,184.12 rows=590 width=28) (actual time=0.030..26.095 rows=30,500 loops=1)

  • Hash Cond: ((forecast."forecastImportId" = abf."forecastImportId") AND (forecast.year = abf.year))
  • Buffers: shared hit=1,343
28. 9.735 9.735 ↑ 1.0 118,009 1

Seq Scan on "MonthlyMarketProductVariantForecast" forecast (cost=0.00..2,522.57 rows=118,057 width=44) (actual time=0.008..9.735 rows=118,009 loops=1)

  • Buffers: shared hit=1,342
29. 0.003 0.007 ↑ 1,270.0 1 1

Hash (cost=22.70..22.70 rows=1,270 width=20) (actual time=0.007..0.007 rows=1 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
  • Buffers: shared hit=1
30. 0.004 0.004 ↑ 1,270.0 1 1

Seq Scan on "AnnualBudgetForecast" abf (cost=0.00..22.70 rows=1,270 width=20) (actual time=0.003..0.004 rows=1 loops=1)

  • Buffers: shared hit=1
31. 94.087 376.348 ↑ 2.0 1 94,087

Bitmap Heap Scan on "MarketProductVariant" mpv_1 (cost=15.71..19.74 rows=2 width=22) (actual time=0.003..0.004 rows=1 loops=94,087)

  • Recheck Cond: ((forecast."marketProductVariantId" = id) OR (m_1."marketProductVariantId" = id))
  • Heap Blocks: exact=94,087
  • Buffers: shared hit=379,634
32. 94.087 282.261 ↓ 0.0 0 94,087

BitmapOr (cost=15.71..15.71 rows=2 width=0) (actual time=0.003..0.003 rows=0 loops=94,087)

  • Buffers: shared hit=285,547
33. 94.087 94.087 ↓ 0.0 0 94,087

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.45 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=94,087)

  • Index Cond: (forecast."marketProductVariantId" = id)
  • Buffers: shared hit=92,668
34. 94.087 94.087 ↑ 1.0 1 94,087

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.45 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=94,087)

  • Index Cond: (m_1."marketProductVariantId" = id)
  • Buffers: shared hit=192,879
35. 12.638 79.671 ↓ 188.0 27,452 1

Hash (cost=651.08..651.08 rows=146 width=648) (actual time=79.671..79.671 rows=27,452 loops=1)

  • Buckets: 32,768 (originally 1024) Batches: 2 (originally 1) Memory Usage: 3,841kB
  • Buffers: shared hit=45,359, temp written=280
36. 8.419 67.033 ↓ 188.0 27,452 1

Nested Loop (cost=341.49..651.08 rows=146 width=648) (actual time=4.812..67.033 rows=27,452 loops=1)

  • Buffers: shared hit=45,359
37. 2.047 18.434 ↓ 186.9 8,036 1

Hash Join (cost=341.08..541.05 rows=43 width=632) (actual time=4.794..18.434 rows=8,036 loops=1)

  • Hash Cond: (pc."businessLineId" = bl.id)
  • Buffers: shared hit=314
38. 2.149 16.379 ↓ 186.9 8,036 1

Hash Join (cost=327.93..527.78 rows=43 width=648) (actual time=4.773..16.379 rows=8,036 loops=1)

  • Hash Cond: (psc."productCategoryId" = pc.id)
  • Buffers: shared hit=313
39. 2.138 14.205 ↓ 186.9 8,036 1

Hash Join (cost=314.78..514.52 rows=43 width=116) (actual time=4.736..14.205 rows=8,036 loops=1)

  • Hash Cond: (ic."productSubcategoryId" = psc.id)
  • Buffers: shared hit=312
40. 2.114 12.007 ↓ 186.9 8,036 1

Hash Join (cost=311.53..511.16 rows=43 width=116) (actual time=4.665..12.007 rows=8,036 loops=1)

  • Hash Cond: (p."industryCutId" = ic.id)
  • Buffers: shared hit=311
41. 3.856 9.779 ↓ 186.9 8,036 1

Hash Join (cost=303.42..502.94 rows=43 width=116) (actual time=4.534..9.779 rows=8,036 loops=1)

  • Hash Cond: (pv."productId" = p.id)
  • Buffers: shared hit=308
42. 1.407 1.407 ↓ 1.0 8,699 1

Seq Scan on "ProductVariant" pv (cost=0.00..176.73 rows=8,673 width=32) (actual time=0.006..1.407 rows=8,699 loops=1)

  • Buffers: shared hit=90
43. 1.730 4.516 ↓ 179.8 4,315 1

Hash (cost=303.12..303.12 rows=24 width=132) (actual time=4.516..4.516 rows=4,315 loops=1)

  • Buckets: 8,192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 722kB
  • Buffers: shared hit=218
44. 2.786 2.786 ↓ 179.8 4,315 1

Seq Scan on "Product" p (cost=0.00..303.12 rows=24 width=132) (actual time=0.008..2.786 rows=4,315 loops=1)

  • Filter: ((type)::text = 'finishedGood'::text)
  • Rows Removed by Filter: 549
  • Buffers: shared hit=218
45. 0.054 0.114 ↑ 1.0 227 1

Hash (cost=5.27..5.27 rows=227 width=32) (actual time=0.114..0.114 rows=227 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=3
46. 0.060 0.060 ↑ 1.0 227 1

Seq Scan on "IndustryCut" ic (cost=0.00..5.27 rows=227 width=32) (actual time=0.005..0.060 rows=227 loops=1)

  • Buffers: shared hit=3
47. 0.038 0.060 ↑ 1.0 100 1

Hash (cost=2.00..2.00 rows=100 width=32) (actual time=0.060..0.060 rows=100 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=1
48. 0.022 0.022 ↑ 1.0 100 1

Seq Scan on "ProductSubcategory" psc (cost=0.00..2.00 rows=100 width=32) (actual time=0.006..0.022 rows=100 loops=1)

  • Buffers: shared hit=1
49. 0.015 0.025 ↑ 3.7 38 1

Hash (cost=11.40..11.40 rows=140 width=548) (actual time=0.025..0.025 rows=38 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
50. 0.010 0.010 ↑ 3.7 38 1

Seq Scan on "ProductCategory" pc (cost=0.00..11.40 rows=140 width=548) (actual time=0.004..0.010 rows=38 loops=1)

  • Buffers: shared hit=1
51. 0.004 0.008 ↑ 20.0 7 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.008..0.008 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
52. 0.004 0.004 ↑ 20.0 7 1

Seq Scan on "BusinessLine" bl (cost=0.00..11.40 rows=140 width=16) (actual time=0.003..0.004 rows=7 loops=1)

  • Buffers: shared hit=1
53. 40.180 40.180 ↑ 1.0 3 8,036

Index Scan using marketproductvariant_productvariantid_marketid_unique on "MarketProductVariant" mpv (cost=0.41..2.53 rows=3 width=48) (actual time=0.003..0.005 rows=3 loops=8,036)

  • Index Cond: ("productVariantId" = pv.id)
  • Buffers: shared hit=45,045
54. 0.016 0.200 ↑ 1.0 58 1

Hash (cost=20.45..20.45 rows=59 width=20) (actual time=0.200..0.200 rows=58 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=6
55. 0.028 0.184 ↑ 1.0 58 1

Hash Join (cost=16.39..20.45 rows=59 width=20) (actual time=0.116..0.184 rows=58 loops=1)

  • Hash Cond: (m."currencyId" = c.id)
  • Buffers: shared hit=6
56. 0.028 0.134 ↑ 1.0 59 1

Hash Join (cost=14.26..18.16 rows=59 width=32) (actual time=0.082..0.134 rows=59 loops=1)

  • Hash Cond: (sr."regionId" = r.id)
  • Buffers: shared hit=5
57. 0.028 0.064 ↑ 1.0 59 1

Hash Join (cost=13.15..16.89 rows=59 width=48) (actual time=0.028..0.064 rows=59 loops=1)

  • Hash Cond: (m."subregionId" = sr.id)
  • Buffers: shared hit=4
58. 0.023 0.023 ↑ 1.0 59 1

Seq Scan on "Market" m (cost=0.00..3.59 rows=59 width=48) (actual time=0.004..0.023 rows=59 loops=1)

  • Buffers: shared hit=3
59. 0.006 0.013 ↑ 10.0 14 1

Hash (cost=11.40..11.40 rows=140 width=32) (actual time=0.013..0.013 rows=14 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
60. 0.007 0.007 ↑ 10.0 14 1

Seq Scan on "Subregion" sr (cost=0.00..11.40 rows=140 width=32) (actual time=0.005..0.007 rows=14 loops=1)

  • Buffers: shared hit=1
61. 0.035 0.042 ↓ 1.2 6 1

Hash (cost=1.05..1.05 rows=5 width=16) (actual time=0.042..0.042 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
62. 0.007 0.007 ↓ 1.2 6 1

Seq Scan on "Region" r (cost=0.00..1.05 rows=5 width=16) (actual time=0.005..0.007 rows=6 loops=1)

  • Buffers: shared hit=1
63. 0.011 0.022 ↑ 1.0 50 1

Hash (cost=1.50..1.50 rows=50 width=20) (actual time=0.022..0.022 rows=50 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
64. 0.011 0.011 ↑ 1.0 50 1

Seq Scan on "Currency" c (cost=0.00..1.50 rows=50 width=20) (actual time=0.004..0.011 rows=50 loops=1)

  • Buffers: shared hit=1
65. 0.014 0.078 ↑ 1.0 63 1

Hash (cost=15.95..15.95 rows=63 width=16) (actual time=0.078..0.078 rows=63 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=3
66. 0.027 0.064 ↑ 1.0 63 1

Hash Join (cost=13.15..15.95 rows=63 width=16) (actual time=0.033..0.064 rows=63 loops=1)

  • Hash Cond: (sb."brandId" = b.id)
  • Buffers: shared hit=3
67. 0.021 0.021 ↑ 1.0 63 1

Seq Scan on "SubBrand" sb (cost=0.00..2.63 rows=63 width=32) (actual time=0.006..0.021 rows=63 loops=1)

  • Buffers: shared hit=2
68. 0.009 0.016 ↑ 4.2 33 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.016..0.016 rows=33 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
69. 0.007 0.007 ↑ 4.2 33 1

Seq Scan on "Brand" b (cost=0.00..11.40 rows=140 width=16) (actual time=0.003..0.007 rows=33 loops=1)

  • Buffers: shared hit=1
70. 0.004 0.011 ↑ 23.3 6 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.011..0.011 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
71. 0.007 0.007 ↑ 23.3 6 1

Seq Scan on "Form" f (cost=0.00..11.40 rows=140 width=16) (actual time=0.006..0.007 rows=6 loops=1)

  • Buffers: shared hit=1
72. 0.003 0.009 ↑ 35.0 4 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.009..0.009 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
73. 0.006 0.006 ↑ 35.0 4 1

Seq Scan on "Demographic" d (cost=0.00..11.40 rows=140 width=16) (actual time=0.005..0.006 rows=4 loops=1)

  • Buffers: shared hit=1
74. 0.004 0.008 ↑ 46.7 3 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.008..0.008 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
75. 0.004 0.004 ↑ 46.7 3 1

Seq Scan on "MarketingManaged" mm (cost=0.00..11.40 rows=140 width=16) (actual time=0.004..0.004 rows=3 loops=1)

  • Buffers: shared hit=1
76. 0.006 0.014 ↑ 35.0 4 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.014..0.014 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
77. 0.008 0.008 ↑ 35.0 4 1

Seq Scan on "MarketingFocus" mf (cost=0.00..11.40 rows=140 width=16) (actual time=0.007..0.008 rows=4 loops=1)

  • Buffers: shared hit=1
78. 1.675 3,644.784 ↓ 330.3 8,588 1

Subquery Scan on *SELECT* 2 (cost=5,829,465.86..5,850,136.60 rows=26 width=556) (actual time=968.819..3,644.784 rows=8,588 loops=1)

  • Buffers: shared hit=764,373 read=37, temp read=877 written=879
79. 13.728 3,643.109 ↓ 330.3 8,588 1

Hash Join (cost=5,829,465.86..5,850,136.34 rows=26 width=6,696) (actual time=968.818..3,643.109 rows=8,588 loops=1)

  • Hash Cond: (m_2."currencyId" = c_1.id)
  • Buffers: shared hit=764,373 read=37, temp read=877 written=879
80. 3.091 3,629.351 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,463.74..5,850,133.22 rows=26 width=591) (actual time=968.751..3,629.351 rows=8,588 loops=1)

  • Buffers: shared hit=764,372 read=37, temp read=877 written=879
81. 3.396 3,609.084 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,463.59..5,850,128.74 rows=26 width=607) (actual time=968.734..3,609.084 rows=8,588 loops=1)

  • Buffers: shared hit=747,196 read=37, temp read=877 written=879
82. 3.210 3,588.512 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,463.45..5,850,124.26 rows=26 width=623) (actual time=968.717..3,588.512 rows=8,588 loops=1)

  • Buffers: shared hit=730,020 read=37, temp read=877 written=879
83. 3.960 3,568.126 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,463.30..5,850,119.78 rows=26 width=639) (actual time=968.702..3,568.126 rows=8,588 loops=1)

  • Buffers: shared hit=712,844 read=37, temp read=877 written=879
84. 10.245 3,546.990 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,463.16..5,850,115.29 rows=26 width=655) (actual time=968.683..3,546.990 rows=8,588 loops=1)

  • Buffers: shared hit=695,668 read=37, temp read=877 written=879
85. 8.784 3,528.157 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,463.01..5,850,091.25 rows=26 width=671) (actual time=965.954..3,528.157 rows=8,588 loops=1)

  • Buffers: shared hit=678,493 read=36, temp read=877 written=879
86. 6.374 3,510.785 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,462.87..5,850,087.07 rows=26 width=671) (actual time=965.940..3,510.785 rows=8,588 loops=1)

  • Join Filter: (sr_1."regionId" = r_1.id)
  • Rows Removed by Join Filter: 20,772
  • Buffers: shared hit=661,317 read=36, temp read=877 written=879
87. 9.567 3,504.411 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,462.87..5,850,084.06 rows=26 width=687) (actual time=965.923..3,504.411 rows=8,588 loops=1)

  • Buffers: shared hit=661,316 read=36, temp read=877 written=879
88. 12.385 3,486.256 ↓ 330.3 8,588 1

Nested Loop (cost=5,829,462.73..5,850,058.30 rows=26 width=687) (actual time=965.909..3,486.256 rows=8,588 loops=1)

  • Buffers: shared hit=644,140 read=36, temp read=877 written=879
89. 7.522 3,465.283 ↓ 214.7 8,588 1

Nested Loop (cost=5,829,462.58..5,850,051.21 rows=40 width=691) (actual time=965.887..3,465.283 rows=8,588 loops=1)

  • Buffers: shared hit=626,964 read=36, temp read=877 written=879
90. 7.988 3,449.173 ↓ 214.7 8,588 1

Nested Loop (cost=5,829,462.43..5,850,030.99 rows=40 width=707) (actual time=965.873..3,449.173 rows=8,588 loops=1)

  • Buffers: shared hit=609,788 read=36, temp read=877 written=879
91. 8.082 3,432.597 ↓ 214.7 8,588 1

Nested Loop (cost=5,829,462.29..5,850,005.28 rows=40 width=175) (actual time=965.859..3,432.597 rows=8,588 loops=1)

  • Buffers: shared hit=592,612 read=36, temp read=877 written=879
92. 9.478 3,415.927 ↓ 214.7 8,588 1

Nested Loop (cost=5,829,462.15..5,849,996.76 rows=40 width=175) (actual time=965.842..3,415.927 rows=8,588 loops=1)

  • Buffers: shared hit=575,436 read=36, temp read=877 written=879
93. 9.998 3,397.861 ↓ 214.7 8,588 1

Nested Loop (cost=5,829,462.00..5,849,990.10 rows=40 width=175) (actual time=965.816..3,397.861 rows=8,588 loops=1)

  • Buffers: shared hit=558,260 read=36, temp read=877 written=879
94. 5.344 3,336.335 ↓ 214.7 8,588 1

Nested Loop (cost=5,829,461.72..5,849,973.36 rows=40 width=91) (actual time=964.881..3,336.335 rows=8,588 loops=1)

  • Buffers: shared hit=532,531 read=1, temp read=877 written=879
95. 8.495 3,313.815 ↓ 214.7 8,588 1

Nested Loop (cost=5,829,461.43..5,849,960.53 rows=40 width=91) (actual time=964.870..3,313.815 rows=8,588 loops=1)

  • Buffers: shared hit=506,731 read=1, temp read=877 written=879
96. 9.766 3,296.732 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,461.29..5,849,954.06 rows=41 width=91) (actual time=964.860..3,296.732 rows=8,588 loops=1)

  • Buffers: shared hit=489,555 read=1, temp read=877 written=879
97. 9.993 3,269.790 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.88..5,849,749.75 rows=41 width=75) (actual time=964.843..3,269.790 rows=8,588 loops=1)

  • Buffers: shared hit=455,181 read=1, temp read=877 written=879
98. 2.539 3,251.209 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.74..5,849,661.06 rows=41 width=91) (actual time=964.825..3,251.209 rows=8,588 loops=1)

  • Buffers: shared hit=438,005 read=1, temp read=877 written=879
99. 10.121 3,231.494 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.59..5,849,572.37 rows=41 width=107) (actual time=963.911..3,231.494 rows=8,588 loops=1)

  • Buffers: shared hit=420,830, temp read=877 written=879
100. 5.978 3,212.785 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.45..5,849,483.68 rows=41 width=123) (actual time=963.899..3,212.785 rows=8,588 loops=1)

  • Buffers: shared hit=403,654, temp read=877 written=879
101. 1,327.705 3,189.631 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.30..5,849,394.99 rows=41 width=139) (actual time=963.886..3,189.631 rows=8,588 loops=1)

  • Join Filter: (rf."marketProductVariantId" = mpvsbe."parentMarketProductVariantId")
  • Rows Removed by Join Filter: 15,461,308
  • Buffers: shared hit=386,478, temp read=877 written=879
102. 3.278 1,105.716 ↓ 12.7 7,202 1

Nested Loop (cost=5,829,460.30..5,831,095.84 rows=565 width=144) (actual time=961.633..1,105.716 rows=7,202 loops=1)

  • Buffers: shared hit=386,410, temp read=877 written=879
103. 43.175 1,102.438 ↓ 12.7 7,202 1

Nested Loop (cost=5,829,460.16..5,831,080.61 rows=565 width=148) (actual time=961.609..1,102.438 rows=7,202 loops=1)

  • Join Filter: (sb_2.id = p_2."subBrandId")
  • Rows Removed by Join Filter: 446,524
  • Buffers: shared hit=386,408, temp read=877 written=879
104. 52.375 1,037.657 ↓ 12.7 7,202 1

Nested Loop (cost=5,829,447.01..5,830,530.58 rows=565 width=164) (actual time=961.550..1,037.657 rows=7,202 loops=1)

  • Join Filter: (m_2.id = mpv_3."marketId")
  • Rows Removed by Join Filter: 410,514
  • Buffers: shared hit=386,405, temp read=877 written=879
105. 0.155 0.326 ↑ 1.0 58 1

Merge Join (cost=22.81..23.93 rows=59 width=48) (actual time=0.114..0.326 rows=58 loops=1)

  • Merge Cond: (m_2."currencyId" = c_2.id)
  • Buffers: shared hit=6
106. 0.066 0.132 ↑ 1.0 59 1

Sort (cost=19.90..20.05 rows=59 width=32) (actual time=0.090..0.132 rows=59 loops=1)

  • Sort Key: m_2."currencyId
  • Sort Method: quicksort Memory: 29kB
  • Buffers: shared hit=5
107. 0.015 0.066 ↑ 1.0 59 1

Hash Join (cost=14.26..18.16 rows=59 width=32) (actual time=0.032..0.066 rows=59 loops=1)

  • Hash Cond: (sr_2."regionId" = r_2.id)
  • Buffers: shared hit=5
108. 0.017 0.043 ↑ 1.0 59 1

Hash Join (cost=13.15..16.89 rows=59 width=48) (actual time=0.019..0.043 rows=59 loops=1)

  • Hash Cond: (m_2."subregionId" = sr_2.id)
  • Buffers: shared hit=4
109. 0.017 0.017 ↑ 1.0 59 1

Seq Scan on "Market" m_2 (cost=0.00..3.59 rows=59 width=48) (actual time=0.005..0.017 rows=59 loops=1)

  • Buffers: shared hit=3
110. 0.003 0.009 ↑ 10.0 14 1

Hash (cost=11.40..11.40 rows=140 width=32) (actual time=0.009..0.009 rows=14 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
111. 0.006 0.006 ↑ 10.0 14 1

Seq Scan on "Subregion" sr_2 (cost=0.00..11.40 rows=140 width=32) (actual time=0.003..0.006 rows=14 loops=1)

  • Buffers: shared hit=1
112. 0.002 0.008 ↓ 1.2 6 1

Hash (cost=1.05..1.05 rows=5 width=16) (actual time=0.008..0.008 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
113. 0.006 0.006 ↓ 1.2 6 1

Seq Scan on "Region" r_2 (cost=0.00..1.05 rows=5 width=16) (actual time=0.005..0.006 rows=6 loops=1)

  • Buffers: shared hit=1
114. 0.034 0.039 ↑ 1.0 50 1

Sort (cost=2.91..3.04 rows=50 width=16) (actual time=0.021..0.039 rows=50 loops=1)

  • Sort Key: c_2.id
  • Sort Method: quicksort Memory: 27kB
  • Buffers: shared hit=1
115. 0.005 0.005 ↑ 1.0 50 1

Seq Scan on "Currency" c_2 (cost=0.00..1.50 rows=50 width=16) (actual time=0.001..0.005 rows=50 loops=1)

  • Buffers: shared hit=1
116. 27.543 984.956 ↓ 12.7 7,202 58

Materialize (cost=5,829,424.20..5,830,008.04 rows=565 width=148) (actual time=16.124..16.982 rows=7,202 loops=58)

  • Buffers: shared hit=386,399, temp read=877 written=879
117. 10.633 957.413 ↓ 12.7 7,202 1

Merge Join (cost=5,829,424.20..5,830,005.22 rows=565 width=148) (actual time=935.149..957.413 rows=7,202 loops=1)

  • Merge Cond: (rf."marketProductVariantId" = mpv_3.id)
  • Buffers: shared hit=386,399, temp read=877 written=879
118. 72.777 937.290 ↑ 1.2 94,083 1

Sort (cost=5,828,767.87..5,829,054.15 rows=114,512 width=32) (actual time=926.193..937.290 rows=94,083 loops=1)

  • Sort Key: rf."marketProductVariantId
  • Sort Method: external merge Disk: 3,504kB
  • Buffers: shared hit=382,399, temp read=877 written=879
119. 9.535 864.513 ↑ 1.2 94,087 1

Subquery Scan on rf (cost=5,813,542.62..5,816,405.42 rows=114,512 width=32) (actual time=824.773..864.513 rows=94,087 loops=1)

  • Buffers: shared hit=382,399, temp read=439 written=440
120. 19.027 854.978 ↑ 1.2 94,087 1

Group (cost=5,813,542.62..5,815,260.30 rows=114,512 width=96) (actual time=824.772..854.978 rows=94,087 loops=1)

  • Group Key: (COALESCE(forecast_1.year, m_3.year)), (COALESCE(forecast_1.month, m_3.month)), mpv_4.id, forecast_1.units, m_3.units
  • Buffers: shared hit=382,399, temp read=439 written=440
121.          

Initplan (for Group)

122. 0.003 0.020 ↑ 1.0 1 1

Limit (cost=33.55..33.55 rows=1 width=24) (actual time=0.018..0.020 rows=1 loops=1)

  • Buffers: shared hit=1
123. 0.014 0.017 ↑ 1,570.0 1 1

Sort (cost=33.55..37.48 rows=1,570 width=24) (actual time=0.017..0.017 rows=1 loops=1)

  • Sort Key: fi_3."importedAt" DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
124. 0.003 0.003 ↑ 1,570.0 1 1

Seq Scan on "ForecastImport" fi_3 (cost=0.00..25.70 rows=1,570 width=24) (actual time=0.002..0.003 rows=1 loops=1)

  • Buffers: shared hit=1
125. 232.299 835.931 ↑ 1.2 94,087 1

Sort (cost=5,813,509.07..5,813,795.35 rows=114,512 width=32) (actual time=824.766..835.931 rows=94,087 loops=1)

  • Sort Key: (COALESCE(forecast_1.year, m_3.year)), (COALESCE(forecast_1.month, m_3.month)), mpv_4.id, forecast_1.units, m_3.units
  • Sort Method: external merge Disk: 3,512kB
  • Buffers: shared hit=382,399, temp read=439 written=440
126. 30.481 603.632 ↑ 1.2 94,087 1

Nested Loop (cost=3,210.15..5,801,146.62 rows=114,512 width=32) (actual time=35.698..603.632 rows=94,087 loops=1)

  • Buffers: shared hit=382,399
127. 85.140 196.803 ↓ 1.6 94,087 1

Hash Full Join (cost=3,194.44..4,669,995.51 rows=57,257 width=56) (actual time=35.675..196.803 rows=94,087 loops=1)

  • Hash Cond: ((m_3."marketProductVariantId" = forecast_1."marketProductVariantId") AND (m_3.month = forecast_1.month) AND (m_3.year = forecast_1.year))
  • Filter: ((COALESCE(forecast_1.year, m_3.year) = 2,020) AND ((COALESCE(forecast_1.month, m_3.month) = 1) OR (COALESCE(forecast_1.month, m_3.month) = 2) OR (COALESCE(forecast_1.month, m_3.month) = 3) OR (COALESCE(forecast_1.month, m_3.month) = 4) OR (COALESCE(forecast_1.month, m_3.month) = 5) OR (COALESCE(forecast_1.month, m_3.month) = 6) OR (COALESCE(forecast_1.month, m_3.month) = 7) OR (COALESCE(forecast_1.month, m_3.month) = 8) OR (COALESCE(forecast_1.month, m_3.month) = 9) OR (COALESCE(forecast_1.month, m_3.month) = 10) OR (COALESCE(forecast_1.month, m_3.month) = 11) OR (COALESCE(forecast_1.month, m_3.month) = 12)))
  • Rows Removed by Filter: 61,287
  • Buffers: shared hit=2,765
128. 48.054 76.046 ↑ 1,570.8 124,880 1

Nested Loop (cost=0.00..2,455,037.42 rows=196,162,080 width=28) (actual time=0.036..76.046 rows=124,880 loops=1)

  • Buffers: shared hit=1,422
129. 27.992 27.992 ↑ 1.0 124,880 1

Seq Scan on "MonthlyMarketProductVariantDemand" m_3 (cost=0.00..2,981.80 rows=124,944 width=28) (actual time=0.029..27.992 rows=124,880 loops=1)

  • Filter: ("forecastImportId" = $1)
  • Buffers: shared hit=1,421
130. 0.000 0.000 ↑ 1,570.0 1 124,880

Materialize (cost=0.00..33.55 rows=1,570 width=0) (actual time=0.000..0.000 rows=1 loops=124,880)

  • Buffers: shared hit=1
131. 0.001 0.001 ↑ 1,570.0 1 1

Seq Scan on "ForecastImport" fi_1 (cost=0.00..25.70 rows=1,570 width=0) (actual time=0.001..0.001 rows=1 loops=1)

  • Buffers: shared hit=1
132. 6.408 35.617 ↓ 51.7 30,500 1

Hash (cost=3,184.12..3,184.12 rows=590 width=28) (actual time=35.617..35.617 rows=30,500 loops=1)

  • Buckets: 32,768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2,044kB
  • Buffers: shared hit=1,343
133. 18.322 29.209 ↓ 51.7 30,500 1

Hash Join (cost=41.75..3,184.12 rows=590 width=28) (actual time=0.014..29.209 rows=30,500 loops=1)

  • Hash Cond: ((forecast_1."forecastImportId" = abf_1."forecastImportId") AND (forecast_1.year = abf_1.year))
  • Buffers: shared hit=1,343
134. 10.883 10.883 ↑ 1.0 118,009 1

Seq Scan on "MonthlyMarketProductVariantForecast" forecast_1 (cost=0.00..2,522.57 rows=118,057 width=44) (actual time=0.003..10.883 rows=118,009 loops=1)

  • Buffers: shared hit=1,342
135. 0.002 0.004 ↑ 1,270.0 1 1

Hash (cost=22.70..22.70 rows=1,270 width=20) (actual time=0.004..0.004 rows=1 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
  • Buffers: shared hit=1
136. 0.002 0.002 ↑ 1,270.0 1 1

Seq Scan on "AnnualBudgetForecast" abf_1 (cost=0.00..22.70 rows=1,270 width=20) (actual time=0.002..0.002 rows=1 loops=1)

  • Buffers: shared hit=1
137. 94.087 376.348 ↑ 2.0 1 94,087

Bitmap Heap Scan on "MarketProductVariant" mpv_4 (cost=15.71..19.74 rows=2 width=16) (actual time=0.004..0.004 rows=1 loops=94,087)

  • Recheck Cond: ((forecast_1."marketProductVariantId" = id) OR (m_3."marketProductVariantId" = id))
  • Heap Blocks: exact=94,087
  • Buffers: shared hit=379,634
138. 94.087 282.261 ↓ 0.0 0 94,087

BitmapOr (cost=15.71..15.71 rows=2 width=0) (actual time=0.003..0.003 rows=0 loops=94,087)

  • Buffers: shared hit=285,547
139. 94.087 94.087 ↓ 0.0 0 94,087

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.45 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=94,087)

  • Index Cond: (forecast_1."marketProductVariantId" = id)
  • Buffers: shared hit=92,668
140. 94.087 94.087 ↑ 1.0 1 94,087

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.45 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=94,087)

  • Index Cond: (m_3."marketProductVariantId" = id)
  • Buffers: shared hit=192,879
141. 1.534 9.490 ↓ 57.6 8,416 1

Sort (cost=656.33..656.69 rows=146 width=116) (actual time=8.914..9.490 rows=8,416 loops=1)

  • Sort Key: mpv_3.id
  • Sort Method: quicksort Memory: 672kB
  • Buffers: shared hit=4,000
142. 0.522 7.956 ↓ 14.8 2,168 1

Nested Loop (cost=341.49..651.08 rows=146 width=116) (actual time=1.529..7.956 rows=2,168 loops=1)

  • Buffers: shared hit=4,000
143. 0.167 4.119 ↓ 15.4 663 1

Hash Join (cost=341.08..541.05 rows=43 width=100) (actual time=1.511..4.119 rows=663 loops=1)

  • Hash Cond: (pc_2."businessLineId" = bl_2.id)
  • Buffers: shared hit=314
144. 0.154 3.936 ↓ 15.4 663 1

Hash Join (cost=327.93..527.78 rows=43 width=116) (actual time=1.483..3.936 rows=663 loops=1)

  • Hash Cond: (psc_2."productCategoryId" = pc_2.id)
  • Buffers: shared hit=313
145. 0.164 3.766 ↓ 15.4 663 1

Hash Join (cost=314.78..514.52 rows=43 width=116) (actual time=1.462..3.766 rows=663 loops=1)

  • Hash Cond: (ic_2."productSubcategoryId" = psc_2.id)
  • Buffers: shared hit=312
146. 0.173 3.570 ↓ 15.4 663 1

Hash Join (cost=311.53..511.16 rows=43 width=116) (actual time=1.421..3.570 rows=663 loops=1)

  • Hash Cond: (p_2."industryCutId" = ic_2.id)
  • Buffers: shared hit=311
147. 0.959 3.327 ↓ 15.4 663 1

Hash Join (cost=303.42..502.94 rows=43 width=116) (actual time=1.339..3.327 rows=663 loops=1)

  • Hash Cond: (pv_2."productId" = p_2.id)
  • Buffers: shared hit=308
148. 1.041 1.041 ↓ 1.0 8,699 1

Seq Scan on "ProductVariant" pv_2 (cost=0.00..176.73 rows=8,673 width=32) (actual time=0.005..1.041 rows=8,699 loops=1)

  • Buffers: shared hit=90
149. 0.119 1.327 ↓ 22.9 549 1

Hash (cost=303.12..303.12 rows=24 width=132) (actual time=1.327..1.327 rows=549 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 92kB
  • Buffers: shared hit=218
150. 1.208 1.208 ↓ 22.9 549 1

Seq Scan on "Product" p_2 (cost=0.00..303.12 rows=24 width=132) (actual time=0.118..1.208 rows=549 loops=1)

  • Filter: ((type)::text = 'salesBundle'::text)
  • Rows Removed by Filter: 4,315
  • Buffers: shared hit=218
151. 0.037 0.070 ↑ 1.0 227 1

Hash (cost=5.27..5.27 rows=227 width=32) (actual time=0.070..0.070 rows=227 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=3
152. 0.033 0.033 ↑ 1.0 227 1

Seq Scan on "IndustryCut" ic_2 (cost=0.00..5.27 rows=227 width=32) (actual time=0.004..0.033 rows=227 loops=1)

  • Buffers: shared hit=3
153. 0.018 0.032 ↑ 1.0 100 1

Hash (cost=2.00..2.00 rows=100 width=32) (actual time=0.032..0.032 rows=100 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=1
154. 0.014 0.014 ↑ 1.0 100 1

Seq Scan on "ProductSubcategory" psc_2 (cost=0.00..2.00 rows=100 width=32) (actual time=0.004..0.014 rows=100 loops=1)

  • Buffers: shared hit=1
155. 0.009 0.016 ↑ 3.7 38 1

Hash (cost=11.40..11.40 rows=140 width=32) (actual time=0.015..0.016 rows=38 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
156. 0.007 0.007 ↑ 3.7 38 1

Seq Scan on "ProductCategory" pc_2 (cost=0.00..11.40 rows=140 width=32) (actual time=0.004..0.007 rows=38 loops=1)

  • Buffers: shared hit=1
157. 0.004 0.016 ↑ 20.0 7 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.016..0.016 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
158. 0.012 0.012 ↑ 20.0 7 1

Seq Scan on "BusinessLine" bl_2 (cost=0.00..11.40 rows=140 width=16) (actual time=0.011..0.012 rows=7 loops=1)

  • Buffers: shared hit=1
159. 3.315 3.315 ↑ 1.0 3 663

Index Scan using marketproductvariant_productvariantid_marketid_unique on "MarketProductVariant" mpv_3 (cost=0.41..2.53 rows=3 width=48) (actual time=0.003..0.005 rows=3 loops=663)

  • Index Cond: ("productVariantId" = pv_2.id)
  • Buffers: shared hit=3,686
160. 21.538 21.606 ↑ 1.0 63 7,202

Materialize (cost=13.15..16.26 rows=63 width=16) (actual time=0.000..0.003 rows=63 loops=7,202)

  • Buffers: shared hit=3
161. 0.026 0.068 ↑ 1.0 63 1

Hash Join (cost=13.15..15.95 rows=63 width=16) (actual time=0.048..0.068 rows=63 loops=1)

  • Hash Cond: (sb_2."brandId" = b_2.id)
  • Buffers: shared hit=3
162. 0.020 0.020 ↑ 1.0 63 1

Seq Scan on "SubBrand" sb_2 (cost=0.00..2.63 rows=63 width=32) (actual time=0.011..0.020 rows=63 loops=1)

  • Buffers: shared hit=2
163. 0.010 0.022 ↑ 4.2 33 1

Hash (cost=11.40..11.40 rows=140 width=16) (actual time=0.022..0.022 rows=33 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
164. 0.012 0.012 ↑ 4.2 33 1

Seq Scan on "Brand" b_2 (cost=0.00..11.40 rows=140 width=16) (actual time=0.007..0.012 rows=33 loops=1)

  • Buffers: shared hit=1
165. 0.000 0.000 ↑ 1.0 1 7,202

Materialize (cost=0.14..8.17 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=7,202)

  • Buffers: shared hit=2
166. 0.019 0.019 ↑ 1.0 1 1

Index Only Scan using producttype_name_unique on "ProductType" pt_2 (cost=0.14..8.16 rows=1 width=32) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (name = 'salesBundle'::text)
  • Heap Fetches: 1
  • Buffers: shared hit=2
167. 755.871 756.210 ↑ 1.0 2,148 7,202

Materialize (cost=0.00..100.22 rows=2,148 width=43) (actual time=0.000..0.105 rows=2,148 loops=7,202)

  • Buffers: shared hit=68
168. 0.339 0.339 ↑ 1.0 2,148 1

Seq Scan on "MarketProductVariantSalesBundleEntry" mpvsbe (cost=0.00..89.48 rows=2,148 width=43) (actual time=0.058..0.339 rows=2,148 loops=1)

  • Buffers: shared hit=68
169. 17.176 17.176 ↑ 1.0 1 8,588

Index Only Scan using "Form_pkey" on "Form" f_2 (cost=0.14..2.16 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = p_2."formId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
170. 8.588 8.588 ↑ 1.0 1 8,588

Index Only Scan using "Demographic_pkey" on "Demographic" d_2 (cost=0.14..2.16 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = p_2."demographicId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
171. 17.176 17.176 ↑ 1.0 1 8,588

Index Only Scan using "MarketingManaged_pkey" on "MarketingManaged" mm_2 (cost=0.14..2.16 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = p_2."marketingManagedId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,175 read=1
172. 8.588 8.588 ↑ 1.0 1 8,588

Index Only Scan using "MarketingFocus_pkey" on "MarketingFocus" mf_2 (cost=0.14..2.16 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = p_2."marketingFocusId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
173. 17.176 17.176 ↑ 1.0 1 8,588

Index Scan using "MarketProductVariant_pkey" on "MarketProductVariant" mpv_2 (cost=0.41..4.98 rows=1 width=48) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = mpvsbe."marketProductVariantId")
  • Buffers: shared hit=34,374
174. 8.588 8.588 ↑ 1.0 1 8,588

Index Scan using "Market_pkey" on "Market" (cost=0.14..0.16 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = mpv_2."marketId")
  • Filter: (NOT "isHidden")
  • Buffers: shared hit=17,176
175. 17.176 17.176 ↑ 1.0 1 8,588

Index Scan using "ProductVariant_pkey" on "ProductVariant" pv_1 (cost=0.29..0.32 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = mpv_2."productVariantId")
  • Buffers: shared hit=25,800
176. 51.528 51.528 ↑ 1.0 1 8,588

Index Scan using "Product_pkey" on "Product" p_1 (cost=0.28..0.42 rows=1 width=132) (actual time=0.006..0.006 rows=1 loops=8,588)

  • Index Cond: (id = pv_1."productId")
  • Buffers: shared hit=25,729 read=35
177. 8.588 8.588 ↑ 1.0 1 8,588

Index Scan using "IndustryCut_pkey" on "IndustryCut" ic_1 (cost=0.14..0.17 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = p_1."industryCutId")
  • Buffers: shared hit=17,176
178. 8.588 8.588 ↑ 1.0 1 8,588

Index Scan using "ProductSubcategory_pkey" on "ProductSubcategory" psc_1 (cost=0.14..0.21 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = ic_1."productSubcategoryId")
  • Buffers: shared hit=17,176
179. 8.588 8.588 ↑ 1.0 1 8,588

Index Scan using "ProductCategory_pkey" on "ProductCategory" pc_1 (cost=0.14..0.64 rows=1 width=548) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = psc_1."productCategoryId")
  • Buffers: shared hit=17,176
180. 8.588 8.588 ↑ 1.0 1 8,588

Index Only Scan using "BusinessLine_pkey" on "BusinessLine" bl_1 (cost=0.14..0.51 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = pc_1."businessLineId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
181. 8.588 8.588 ↑ 1.0 1 8,588

Index Only Scan using producttype_name_unique on "ProductType" pt_1 (cost=0.15..0.18 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (name = (p_1.type)::text)
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
182. 8.588 8.588 ↑ 1.0 1 8,588

Index Scan using "Subregion_pkey" on "Subregion" sr_1 (cost=0.14..0.99 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = "Market"."subregionId")
  • Buffers: shared hit=17,176
183. 0.000 0.000 ↑ 1.7 3 8,588

Materialize (cost=0.00..1.07 rows=5 width=16) (actual time=0.000..0.000 rows=3 loops=8,588)

  • Buffers: shared hit=1
184. 0.010 0.010 ↑ 1.0 5 1

Seq Scan on "Region" r_1 (cost=0.00..1.05 rows=5 width=16) (actual time=0.008..0.010 rows=5 loops=1)

  • Buffers: shared hit=1
185. 8.588 8.588 ↑ 1.0 1 8,588

Index Scan using "SubBrand_pkey" on "SubBrand" sb_1 (cost=0.14..0.16 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = p_1."subBrandId")
  • Buffers: shared hit=17,176
186. 8.588 8.588 ↑ 1.0 1 8,588

Index Only Scan using "Brand_pkey" on "Brand" b_1 (cost=0.14..0.92 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=8,588)

  • Index Cond: (id = sb_1."brandId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,175 read=1
187. 17.176 17.176 ↑ 1.0 1 8,588

Index Only Scan using "Form_pkey" on "Form" f_1 (cost=0.14..0.17 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = p_1."formId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
188. 17.176 17.176 ↑ 1.0 1 8,588

Index Only Scan using "Demographic_pkey" on "Demographic" d_1 (cost=0.14..0.17 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = p_1."demographicId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
189. 17.176 17.176 ↑ 1.0 1 8,588

Index Only Scan using "MarketingManaged_pkey" on "MarketingManaged" mm_1 (cost=0.14..0.17 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = p_1."marketingManagedId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
190. 17.176 17.176 ↑ 1.0 1 8,588

Index Only Scan using "MarketingFocus_pkey" on "MarketingFocus" mf_1 (cost=0.14..0.17 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = p_1."marketingFocusId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
191. 0.010 0.030 ↑ 1.0 50 1

Hash (cost=1.50..1.50 rows=50 width=20) (actual time=0.030..0.030 rows=50 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
192. 0.020 0.020 ↑ 1.0 50 1

Seq Scan on "Currency" c_1 (cost=0.00..1.50 rows=50 width=20) (actual time=0.014..0.020 rows=50 loops=1)

  • Buffers: shared hit=1
Planning time : 25.055 ms
Execution time : 5,076.133 ms