explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Kzd : review1 (no filter)

Settings
# exclusive inclusive rows x rows loops node
1. 32.676 7,483.571 ↓ 2.0 400 1

GroupAggregate (cost=11,669,337.24..11,669,349.58 rows=200 width=556) (actual time=7,422.641..7,483.571 rows=400 loops=1)

  • Group Key: "*SELECT* 1"."productCategoryId", "*SELECT* 1"."productCategoryName", "*SELECT* 1".year, "*SELECT* 1".month
  • Buffers: shared hit=1,192,183, temp read=3,303 written=3,305
2. 329.273 7,450.895 ↓ 161.5 95,473 1

Sort (cost=11,669,337.24..11,669,338.72 rows=591 width=556) (actual time=7,422.550..7,450.895 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,183, temp read=3,303 written=3,305
3. 142.676 7,121.622 ↓ 161.5 95,473 1

Append (cost=5,814,678.19..11,669,310.03 rows=591 width=556) (actual time=1,039.168..7,121.622 rows=95,473 loops=1)

  • Buffers: shared hit=1,192,183, temp read=2,610 written=2,611
4. 19.037 1,547.516 ↓ 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=1,039.168..1,547.516 rows=86,885 loops=1)

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=427,769, temp read=1,733 written=1,732
10. 0.018 0.018 ↑ 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.018 rows=1 loops=1)

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

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

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

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

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

Hash Join (cost=5,814,587.52..5,819,030.50 rows=565 width=704) (actual time=1,038.850..1,230.431 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. 73.928 1,039.353 ↑ 1.2 94,087 1

Group (cost=5,813,934.62..5,816,797.42 rows=114,512 width=96) (actual time=943.774..1,039.353 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.002 0.025 ↑ 1.0 1 1

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

  • Buffers: shared hit=1
17. 0.018 0.023 ↑ 1,570.0 1 1

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

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

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

  • Buffers: shared hit=1
19. 301.357 965.400 ↑ 1.2 94,087 1

Sort (cost=5,813,901.07..5,814,187.35 rows=114,512 width=38) (actual time=943.761..965.400 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. 53.288 664.043 ↑ 1.2 94,087 1

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

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

Hash Full Join (cost=3,194.44..4,669,995.51 rows=57,257 width=56) (actual time=48.685..234.407 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. 58.592 89.973 ↑ 1,570.8 124,880 1

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

  • Buffers: shared hit=1,422
23. 31.381 31.381 ↑ 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.036..31.381 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. 8.158 48.617 ↓ 51.7 30,500 1

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

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

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

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

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

  • Buffers: shared hit=1,342
29. 0.004 0.006 ↑ 1,270.0 1 1

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

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

Seq Scan on "AnnualBudgetForecast" abf (cost=0.00..22.70 rows=1,270 width=20) (actual time=0.002..0.002 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.004..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. 16.386 95.004 ↓ 188.0 27,452 1

Hash (cost=651.08..651.08 rows=146 width=648) (actual time=95.004..95.004 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. 7.816 78.618 ↓ 188.0 27,452 1

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=90
43. 1.773 4.485 ↓ 179.8 4,315 1

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

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

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

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

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

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

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

  • Buffers: shared hit=3
47. 0.024 0.043 ↑ 1.0 100 1

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

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

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

  • Buffers: shared hit=1
49. 0.012 0.023 ↑ 3.7 38 1

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

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

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

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

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

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

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

  • Buffers: shared hit=1
53. 48.216 48.216 ↑ 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.006 rows=3 loops=8,036)

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=3
59. 0.005 0.011 ↑ 10.0 14 1

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

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

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

  • Buffers: shared hit=1
61. 0.004 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
62. 0.004 0.004 ↓ 1.2 6 1

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

  • Buffers: shared hit=1
63. 0.012 0.023 ↑ 1.0 50 1

Hash (cost=1.50..1.50 rows=50 width=20) (actual time=0.023..0.023 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.003..0.011 rows=50 loops=1)

  • Buffers: shared hit=1
65. 0.015 0.070 ↑ 1.0 63 1

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

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

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

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

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

  • Buffers: shared hit=2
68. 0.008 0.014 ↑ 4.2 33 1

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

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

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

  • Buffers: shared hit=1
70. 0.003 0.008 ↑ 23.3 6 1

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

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

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

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

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

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

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

  • Buffers: shared hit=1
74. 0.001 0.007 ↑ 46.7 3 1

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

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

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

  • Buffers: shared hit=1
76. 0.008 0.023 ↑ 35.0 4 1

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

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

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

  • Buffers: shared hit=1
78. 2.335 5,431.430 ↓ 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=1,089.711..5,431.430 rows=8,588 loops=1)

  • Buffers: shared hit=764,410, temp read=877 written=879
79. 25.411 5,429.095 ↓ 330.3 8,588 1

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

  • Hash Cond: (m_2."currencyId" = c_1.id)
  • Buffers: shared hit=764,410, temp read=877 written=879
80. 8.012 5,403.645 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=764,409, temp read=877 written=879
81. 7.239 5,378.457 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=747,233, temp read=877 written=879
82. 7.171 5,354.042 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=730,057, temp read=877 written=879
83. 8.012 5,329.695 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=712,881, temp read=877 written=879
84. 2.549 5,304.507 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=695,705, temp read=877 written=879
85. 13.266 5,284.782 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=678,529, temp read=877 written=879
86. 8.993 5,262.928 ↓ 330.3 8,588 1

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

  • Join Filter: (sr_1."regionId" = r_1.id)
  • Rows Removed by Join Filter: 20,772
  • Buffers: shared hit=661,353, temp read=877 written=879
87. 5.611 5,253.935 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=661,352, temp read=877 written=879
88. 10.312 5,231.148 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=644,176, temp read=877 written=879
89. 2.486 5,203.660 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=627,000, temp read=877 written=879
90. 12.192 5,183.998 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=609,824, temp read=877 written=879
91. 12.522 5,163.218 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=592,648, temp read=877 written=879
92. 7.581 5,142.108 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=575,472, temp read=877 written=879
93. 11.959 5,117.351 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=558,296, temp read=877 written=879
94. 11.283 5,088.216 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=532,532, temp read=877 written=879
95. 4.706 5,059.757 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=506,732, temp read=877 written=879
96. 8.633 5,037.875 ↓ 209.5 8,588 1

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

  • Buffers: shared hit=489,556, temp read=877 written=879
97. 5.028 5,003.478 ↓ 209.5 8,588 1

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

  • Buffers: shared hit=455,182, temp read=877 written=879
98. 5.012 4,981.274 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.74..5,849,661.06 rows=41 width=91) (actual time=1,089.412..4,981.274 rows=8,588 loops=1)

  • Buffers: shared hit=438,006, temp read=877 written=879
99. 5.377 4,959.086 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.59..5,849,572.37 rows=41 width=107) (actual time=1,089.400..4,959.086 rows=8,588 loops=1)

  • Buffers: shared hit=420,830, temp read=877 written=879
100. 11.590 4,936.533 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.45..5,849,483.68 rows=41 width=123) (actual time=1,089.381..4,936.533 rows=8,588 loops=1)

  • Buffers: shared hit=403,654, temp read=877 written=879
101. 2,386.033 4,907.767 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.30..5,849,394.99 rows=41 width=139) (actual time=1,089.364..4,907.767 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. 4.279 1,282.990 ↓ 12.7 7,202 1

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

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

Nested Loop (cost=5,829,460.16..5,831,080.61 rows=565 width=148) (actual time=1,085.426..1,278.711 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. 74.390 1,191.986 ↓ 12.7 7,202 1

Nested Loop (cost=5,829,447.01..5,830,530.58 rows=565 width=164) (actual time=1,085.355..1,191.986 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.191 0.458 ↑ 1.0 58 1

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=1
112. 0.005 0.014 ↓ 1.2 6 1

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

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

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

  • Buffers: shared hit=1
114. 0.045 0.055 ↑ 1.0 50 1

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

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

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

  • Buffers: shared hit=1
116. 37.884 1,117.138 ↓ 12.7 7,202 58

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

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

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

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

Sort (cost=5,828,767.87..5,829,054.15 rows=114,512 width=32) (actual time=1,030.865..1,048.157 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. 16.888 962.718 ↑ 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=898.250..962.718 rows=94,087 loops=1)

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

Group (cost=5,813,542.62..5,815,260.30 rows=114,512 width=96) (actual time=898.249..945.830 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.030 ↑ 1.0 1 1

Limit (cost=33.55..33.55 rows=1 width=24) (actual time=0.029..0.030 rows=1 loops=1)

  • Buffers: shared hit=1
123. 0.023 0.027 ↑ 1,570.0 1 1

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

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

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

  • Buffers: shared hit=1
125. 238.292 915.127 ↑ 1.2 94,087 1

Sort (cost=5,813,509.07..5,813,795.35 rows=114,512 width=32) (actual time=898.244..915.127 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. 53.529 676.835 ↑ 1.2 94,087 1

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

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

Hash Full Join (cost=3,194.44..4,669,995.51 rows=57,257 width=56) (actual time=55.975..246.958 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. 64.703 95.964 ↑ 1,570.8 124,880 1

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

  • Buffers: shared hit=1,422
129. 31.261 31.261 ↑ 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.044..31.261 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.002 0.002 ↑ 1,570.0 1 1

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

  • Buffers: shared hit=1
132. 9.969 55.892 ↓ 51.7 30,500 1

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

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

Hash Join (cost=41.75..3,184.12 rows=590 width=28) (actual time=0.031..45.923 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. 16.008 16.008 ↑ 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.006..16.008 rows=118,009 loops=1)

  • Buffers: shared hit=1,342
135. 0.004 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
136. 0.003 0.003 ↑ 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.003 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. 0.000 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. 188.174 188.174 ↑ 1.0 1 94,087

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

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

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

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

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

  • Buffers: shared hit=4,000
143. 0.239 5.870 ↓ 15.4 663 1

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

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=90
149. 0.199 1.762 ↓ 22.9 549 1

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

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

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

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

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

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

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

  • Buffers: shared hit=3
153. 0.021 0.043 ↑ 1.0 100 1

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

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

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

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

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

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

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

  • Buffers: shared hit=1
157. 0.006 0.019 ↑ 20.0 7 1

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

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

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

  • Buffers: shared hit=1
159. 3.978 3.978 ↑ 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.006 rows=3 loops=663)

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

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

  • Buffers: shared hit=3
161. 0.032 0.083 ↑ 1.0 63 1

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

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

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

  • Buffers: shared hit=2
163. 0.012 0.025 ↑ 4.2 33 1

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

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

Seq Scan on "Brand" b_2 (cost=0.00..11.40 rows=140 width=16) (actual time=0.007..0.013 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.018 0.018 ↑ 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.017..0.018 rows=1 loops=1)

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

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

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

Seq Scan on "MarketProductVariantSalesBundleEntry" mpvsbe (cost=0.00..89.48 rows=2,148 width=43) (actual time=0.061..0.533 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. 17.176 17.176 ↑ 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.002..0.002 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,176
172. 17.176 17.176 ↑ 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.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = p_2."marketingFocusId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
173. 25.764 25.764 ↑ 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.003..0.003 rows=1 loops=8,588)

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

Index Scan using "Market_pkey" on "Market" (cost=0.14..0.16 rows=1 width=32) (actual time=0.002..0.002 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. 17.176 17.176 ↑ 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.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = pv_1."productId")
  • Buffers: shared hit=25,764
177. 17.176 17.176 ↑ 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.002..0.002 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. 17.176 17.176 ↑ 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.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = pc_1."businessLineId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
181. 17.176 17.176 ↑ 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.002..0.002 rows=1 loops=8,588)

  • Index Cond: (name = (p_1.type)::text)
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
182. 17.176 17.176 ↑ 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.002..0.002 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.007 0.007 ↑ 1.0 5 1

Seq Scan on "Region" r_1 (cost=0.00..1.05 rows=5 width=16) (actual time=0.006..0.007 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. 17.176 17.176 ↑ 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.002..0.002 rows=1 loops=8,588)

  • Index Cond: (id = sb_1."brandId")
  • Heap Fetches: 8,588
  • Buffers: shared hit=17,176
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.016 0.039 ↑ 1.0 50 1

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

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

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

  • Buffers: shared hit=1
Planning time : 56.516 ms
Execution time : 7,527.354 ms