explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RLP1 : review1 db (without where clause)

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 29,602.398 ↓ 0.0 0 1

GroupAggregate (cost=165,394.45..165,394.56 rows=4 width=56) (actual time=29,602.398..29,602.398 rows=0 loops=1)

  • Group Key: "*SELECT* 1"."subBrandId", "*SELECT* 1"."subBrandName", "*SELECT* 1".year, "*SELECT* 1".month
  • Buffers: shared hit=3,007,870 read=4,010, temp read=13,222 written=13,217
2. 0.017 29,602.397 ↓ 0.0 0 1

Sort (cost=165,394.45..165,394.46 rows=4 width=56) (actual time=29,602.396..29,602.397 rows=0 loops=1)

  • Sort Key: "*SELECT* 1"."subBrandId", "*SELECT* 1"."subBrandName", "*SELECT* 1".month
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=3,007,870 read=4,010, temp read=13,222 written=13,217
3. 0.000 29,602.380 ↓ 0.0 0 1

Append (cost=82,552.61..165,394.41 rows=4 width=56) (actual time=29,602.380..29,602.380 rows=0 loops=1)

  • Buffers: shared hit=3,007,864 read=4,010, temp read=13,222 written=13,217
4. 0.001 6,620.841 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=82,552.61..82,561.86 rows=3 width=56) (actual time=6,620.840..6,620.841 rows=0 loops=1)

  • Buffers: shared hit=1,517,398 read=3,948, temp read=10,144 written=10,127
5. 0.463 6,620.840 ↓ 0.0 0 1

Hash Join (cost=82,552.61..82,561.83 rows=3 width=6,196) (actual time=6,620.839..6,620.840 rows=0 loops=1)

  • Hash Cond: (p."marketingFocusId" = mf.id)
  • Buffers: shared hit=1,517,398 read=3,948, temp read=10,144 written=10,127
6. 0.405 6,620.349 ↓ 0.0 0 1

Hash Join (cost=82,551.52..82,560.66 rows=3 width=124) (actual time=6,620.348..6,620.349 rows=0 loops=1)

  • Hash Cond: (p."marketingManagedId" = mm.id)
  • Buffers: shared hit=1,517,398 read=3,947, temp read=10,144 written=10,127
7. 0.008 6,619.937 ↓ 0.0 0 1

Hash Join (cost=82,550.45..82,559.58 rows=3 width=140) (actual time=6,619.937..6,619.937 rows=0 loops=1)

  • Hash Cond: (p."demographicId" = d.id)
  • Buffers: shared hit=1,517,398 read=3,946, temp read=10,144 written=10,127
8. 28.447 6,619.432 ↓ 0.0 0 1

Nested Loop (cost=82,549.36..82,558.47 rows=3 width=156) (actual time=6,619.432..6,619.432 rows=0 loops=1)

  • Buffers: shared hit=1,517,398 read=3,945, temp read=10,144 written=10,127
9. 62.787 6,505.907 ↓ 28,359.3 85,078 1

Nested Loop (cost=82,549.21..82,552.67 rows=3 width=172) (actual time=6,380.357..6,505.907 rows=85,078 loops=1)

  • Buffers: shared hit=1,432,320 read=3,945, temp read=10,144 written=10,127
10. 0.417 0.417 ↑ 1.0 1 1

Seq Scan on "ProductType" pt (cost=0.00..1.02 rows=1 width=32) (actual time=0.414..0.417 rows=1 loops=1)

  • Filter: (name = 'finishedGood'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared read=1
11. 62.624 6,442.703 ↓ 28,359.3 85,078 1

Hash Join (cost=82,549.21..82,551.62 rows=3 width=176) (actual time=6,379.940..6,442.703 rows=85,078 loops=1)

  • Hash Cond: (m.id = mpv."marketId")
  • Buffers: shared hit=1,432,320 read=3,944, temp read=10,144 written=10,127
12. 0.067 1.410 ↑ 1.0 58 1

Hash Join (cost=4.58..6.73 rows=59 width=20) (actual time=1.233..1.410 rows=58 loops=1)

  • Hash Cond: (m."currencyId" = c.id)
  • Buffers: shared hit=1 read=3
13. 0.057 0.902 ↑ 1.0 59 1

Hash Join (cost=2.45..4.44 rows=59 width=32) (actual time=0.773..0.902 rows=59 loops=1)

  • Hash Cond: (sr."regionId" = r.id)
  • Buffers: shared hit=1 read=2
14. 0.066 0.460 ↑ 1.0 59 1

Hash Join (cost=1.32..3.10 rows=59 width=48) (actual time=0.379..0.460 rows=59 loops=1)

  • Hash Cond: (m."subregionId" = sr.id)
  • Buffers: shared hit=1 read=1
15. 0.030 0.030 ↑ 1.0 59 1

Seq Scan on "Market" m (cost=0.00..1.59 rows=59 width=48) (actual time=0.006..0.030 rows=59 loops=1)

  • Buffers: shared hit=1
16. 0.011 0.364 ↑ 1.0 14 1

Hash (cost=1.14..1.14 rows=14 width=32) (actual time=0.363..0.364 rows=14 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared read=1
17. 0.353 0.353 ↑ 1.0 14 1

Seq Scan on "Subregion" sr (cost=0.00..1.14 rows=14 width=32) (actual time=0.347..0.353 rows=14 loops=1)

  • Buffers: shared read=1
18. 0.008 0.385 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=16) (actual time=0.385..0.385 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared read=1
19. 0.377 0.377 ↑ 1.0 6 1

Seq Scan on "Region" r (cost=0.00..1.06 rows=6 width=16) (actual time=0.373..0.377 rows=6 loops=1)

  • Buffers: shared read=1
20. 0.028 0.441 ↑ 1.0 50 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared read=1
21. 0.413 0.413 ↑ 1.0 50 1

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

  • Buffers: shared read=1
22. 52.083 6,378.669 ↓ 28,359.3 85,078 1

Hash (cost=82,544.60..82,544.60 rows=3 width=188) (actual time=6,378.669..6,378.669 rows=85,078 loops=1)

  • Buckets: 32,768 (originally 1024) Batches: 8 (originally 1) Memory Usage: 3,841kB
  • Buffers: shared hit=1,432,319 read=3,941, temp read=8,063 written=9,525
23. 62.153 6,326.586 ↓ 28,359.3 85,078 1

Hash Join (cost=82,542.36..82,544.60 rows=3 width=188) (actual time=6,264.385..6,326.586 rows=85,078 loops=1)

  • Hash Cond: (sb.id = p."subBrandId")
  • Buffers: shared hit=1,432,319 read=3,941, temp read=8,063 written=8,060
24. 0.077 0.475 ↑ 1.0 63 1

Hash Join (cost=1.74..3.56 rows=63 width=32) (actual time=0.378..0.475 rows=63 loops=1)

  • Hash Cond: (sb."brandId" = b.id)
  • Buffers: shared hit=1 read=1
25. 0.032 0.032 ↑ 1.0 63 1

Seq Scan on "SubBrand" sb (cost=0.00..1.63 rows=63 width=48) (actual time=0.004..0.032 rows=63 loops=1)

  • Buffers: shared hit=1
26. 0.018 0.366 ↑ 1.0 33 1

Hash (cost=1.33..1.33 rows=33 width=16) (actual time=0.365..0.366 rows=33 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared read=1
27. 0.348 0.348 ↑ 1.0 33 1

Seq Scan on "Brand" b (cost=0.00..1.33 rows=33 width=16) (actual time=0.335..0.348 rows=33 loops=1)

  • Buffers: shared read=1
28. 53.033 6,263.958 ↓ 28,359.3 85,078 1

Hash (cost=82,540.58..82,540.58 rows=3 width=172) (actual time=6,263.958..6,263.958 rows=85,078 loops=1)

  • Buckets: 32,768 (originally 1024) Batches: 8 (originally 1) Memory Usage: 3,841kB
  • Buffers: shared hit=1,432,318 read=3,940, temp read=6,032 written=7,220
29. 101.226 6,210.925 ↓ 28,359.3 85,078 1

Hash Join (cost=82,520.63..82,540.58 rows=3 width=172) (actual time=5,673.639..6,210.925 rows=85,078 loops=1)

  • Hash Cond: (mpv_1.id = mpv.id)
  • Buffers: shared hit=1,432,318 read=3,940, temp read=6,032 written=6,041
30. 253.110 5,838.937 ↓ 178.4 91,717 1

Group (cost=82,031.73..82,044.58 rows=514 width=96) (actual time=5,402.801..5,838.937 rows=91,717 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=1,378,963 read=2,863, temp read=5,475 written=5,486
31.          

Initplan (for Group)

32. 0.003 0.407 ↑ 1.0 1 1

Limit (cost=1.07..1.08 rows=1 width=24) (actual time=0.405..0.407 rows=1 loops=1)

  • Buffers: shared hit=3 read=1
33. 0.023 0.404 ↑ 5.0 1 1

Sort (cost=1.07..1.09 rows=5 width=24) (actual time=0.403..0.404 rows=1 loops=1)

  • Sort Key: fi_2."importedAt" DESC
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=3 read=1
34. 0.381 0.381 ↑ 1.0 5 1

Seq Scan on "ForecastImport" fi_2 (cost=0.00..1.05 rows=5 width=24) (actual time=0.378..0.381 rows=5 loops=1)

  • Buffers: shared read=1
35. 814.243 5,585.420 ↓ 892.2 458,585 1

Sort (cost=82,030.65..82,031.94 rows=514 width=38) (actual time=5,402.794..5,585.420 rows=458,585 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: 21,920kB
  • Buffers: shared hit=1,378,963 read=2,863, temp read=5,475 written=5,486
36. 989.853 4,771.177 ↓ 892.2 458,585 1

Nested Loop (cost=36,898.77..82,007.51 rows=514 width=38) (actual time=29.053..4,771.177 rows=458,585 loops=1)

  • Buffers: shared hit=1,378,963 read=2,863
37. 638.615 1,946.984 ↓ 1,784.4 458,585 1

Hash Full Join (cost=36,882.65..76,822.78 rows=257 width=56) (actual time=28.737..1,946.984 rows=458,585 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: 442,335
  • Buffers: shared hit=156 read=2,745
38. 809.978 1,300.694 ↓ 1.0 900,920 1

Nested Loop (cost=4,081.10..27,293.69 rows=880,435 width=28) (actual time=20.967..1,300.694 rows=900,920 loops=1)

  • Buffers: shared hit=4 read=2,742
39. 109.577 130.348 ↓ 1.0 180,184 1

Bitmap Heap Scan on "MonthlyMarketProductVariantDemand" m_1 (cost=4,081.10..16,287.19 rows=176,087 width=28) (actual time=20.958..130.348 rows=180,184 loops=1)

  • Recheck Cond: ("forecastImportId" = $0)
  • Heap Blocks: exact=2,048
  • Buffers: shared hit=3 read=2,742
40. 20.771 20.771 ↓ 1.0 180,184 1

Bitmap Index Scan on monthlymarketproductvariantdemand_forecastimportid_index (cost=0.00..4,037.08 rows=176,087 width=0) (actual time=20.771..20.771 rows=180,184 loops=1)

  • Index Cond: ("forecastImportId" = $0)
  • Buffers: shared hit=3 read=694
41. 360.362 360.368 ↑ 1.0 5 180,184

Materialize (cost=0.00..1.07 rows=5 width=0) (actual time=0.000..0.002 rows=5 loops=180,184)

  • Buffers: shared hit=1
42. 0.006 0.006 ↑ 1.0 5 1

Seq Scan on "ForecastImport" fi (cost=0.00..1.05 rows=5 width=0) (actual time=0.004..0.006 rows=5 loops=1)

  • Buffers: shared hit=1
43. 0.000 7.675 ↓ 0.0 0 1

Hash (cost=32,649.74..32,649.74 rows=8,675 width=28) (actual time=7.675..7.675 rows=0 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 128kB
  • Buffers: shared hit=152 read=3
44. 7.689 7.806 ↓ 0.0 0 1

Gather (cost=1,041.75..32,649.74 rows=8,675 width=28) (actual time=7.673..7.806 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=152 read=3
45. 0.098 0.117 ↓ 0.0 0 3 / 3

Hash Join (cost=41.75..30,782.24 rows=3,615 width=28) (actual time=0.116..0.117 rows=0 loops=3)

  • Hash Cond: ((forecast."forecastImportId" = abf."forecastImportId") AND (forecast.year = abf.year))
  • Buffers: shared hit=152 read=3
46. 0.015 0.015 ↑ 722,915.0 1 3 / 3

Parallel Seq Scan on "MonthlyMarketProductVariantForecast" forecast (cost=0.00..26,945.15 rows=722,915 width=44) (actual time=0.014..0.015 rows=1 loops=3)

  • Buffers: shared read=3
47. 0.001 0.004 ↓ 0.0 0 3 / 3

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 16kB
48. 0.003 0.003 ↓ 0.0 0 3 / 3

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

49. 458.585 1,834.340 ↑ 2.0 1 458,585

Bitmap Heap Scan on "MarketProductVariant" mpv_1 (cost=16.12..20.15 rows=2 width=22) (actual time=0.004..0.004 rows=1 loops=458,585)

  • Recheck Cond: ((forecast."marketProductVariantId" = id) OR (m_1."marketProductVariantId" = id))
  • Heap Blocks: exact=458,585
  • Buffers: shared hit=1,378,807 read=118
50. 917.170 1,375.755 ↓ 0.0 0 458,585

BitmapOr (cost=16.12..16.12 rows=2 width=0) (actual time=0.003..0.003 rows=0 loops=458,585)

  • Buffers: shared hit=920,222 read=118
51. 0.000 0.000 ↓ 0.0 0 458,585

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.30 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=458,585)

  • Index Cond: (forecast."marketProductVariantId" = id)
52. 458.585 458.585 ↑ 1.0 1 458,585

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.30 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=458,585)

  • Index Cond: (m_1."marketProductVariantId" = id)
  • Buffers: shared hit=920,222 read=118
53. 19.272 270.762 ↓ 187.6 28,894 1

Hash (cost=486.98..486.98 rows=154 width=116) (actual time=270.761..270.762 rows=28,894 loops=1)

  • Buckets: 32,768 (originally 1024) Batches: 2 (originally 1) Memory Usage: 3,841kB
  • Buffers: shared hit=53,355 read=1,077, temp written=236
54. 31.498 251.490 ↓ 187.6 28,894 1

Nested Loop (cost=238.35..486.98 rows=154 width=116) (actual time=12.210..251.490 rows=28,894 loops=1)

  • Buffers: shared hit=53,355 read=1,077
55. 7.071 52.752 ↓ 185.8 8,362 1

Hash Join (cost=237.94..446.37 rows=45 width=100) (actual time=10.629..52.752 rows=8,362 loops=1)

  • Hash Cond: (pc."businessLineId" = bl.id)
  • Buffers: shared hit=11 read=229
56. 7.105 45.343 ↓ 185.8 8,362 1

Hash Join (cost=236.78..445.08 rows=45 width=116) (actual time=10.284..45.343 rows=8,362 loops=1)

  • Hash Cond: (psc."productCategoryId" = pc.id)
  • Buffers: shared hit=11 read=228
57. 7.033 37.905 ↓ 185.8 8,362 1

Hash Join (cost=234.92..443.10 rows=45 width=116) (actual time=9.943..37.905 rows=8,362 loops=1)

  • Hash Cond: (ic."productSubcategoryId" = psc.id)
  • Buffers: shared hit=11 read=227
58. 7.126 30.784 ↓ 185.8 8,362 1

Hash Join (cost=231.67..439.73 rows=45 width=116) (actual time=9.847..30.784 rows=8,362 loops=1)

  • Hash Cond: (p."industryCutId" = ic.id)
  • Buffers: shared hit=10 read=227
59. 9.189 23.129 ↓ 185.8 8,362 1

Hash Join (cost=223.56..431.50 rows=45 width=116) (actual time=9.308..23.129 rows=8,362 loops=1)

  • Hash Cond: (pv."productId" = p.id)
  • Buffers: shared hit=8 read=226
60. 5.029 5.029 ↑ 1.0 9,023 1

Seq Scan on "ProductVariant" pv (cost=0.00..184.23 rows=9,023 width=32) (actual time=0.384..5.029 rows=9,023 loops=1)

  • Buffers: shared hit=4 read=90
61. 2.400 8.911 ↓ 180.1 4,502 1

Hash (cost=223.25..223.25 rows=25 width=132) (actual time=8.910..8.911 rows=4,502 loops=1)

  • Buckets: 8,192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 751kB
  • Buffers: shared hit=4 read=136
62. 6.511 6.511 ↓ 180.1 4,502 1

Seq Scan on "Product" p (cost=0.00..223.25 rows=25 width=132) (actual time=0.928..6.511 rows=4,502 loops=1)

  • Filter: ((type)::text = 'finishedGood'::text)
  • Rows Removed by Filter: 541
  • Buffers: shared hit=4 read=136
63. 0.099 0.529 ↑ 1.0 227 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=2 read=1
64. 0.430 0.430 ↑ 1.0 227 1

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

  • Buffers: shared hit=2 read=1
65. 0.045 0.088 ↑ 1.0 100 1

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

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

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

  • Buffers: shared hit=1
67. 0.021 0.333 ↑ 1.0 38 1

Hash (cost=1.38..1.38 rows=38 width=32) (actual time=0.333..0.333 rows=38 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared read=1
68. 0.312 0.312 ↑ 1.0 38 1

Seq Scan on "ProductCategory" pc (cost=0.00..1.38 rows=38 width=32) (actual time=0.297..0.312 rows=38 loops=1)

  • Buffers: shared read=1
69. 0.009 0.338 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=16) (actual time=0.338..0.338 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared read=1
70. 0.329 0.329 ↑ 1.0 7 1

Seq Scan on "BusinessLine" bl (cost=0.00..1.07 rows=7 width=16) (actual time=0.325..0.329 rows=7 loops=1)

  • Buffers: shared read=1
71. 167.240 167.240 ↑ 1.3 3 8,362

Index Scan using marketproductvariant_productvariantid_marketid_unique on "MarketProductVariant" mpv (cost=0.41..0.86 rows=4 width=48) (actual time=0.008..0.020 rows=3 loops=8,362)

  • Index Cond: ("productVariantId" = pv.id)
  • Buffers: shared hit=53,344 read=848
72. 85.078 85.078 ↓ 0.0 0 85,078

Index Only Scan using "Form_pkey" on "Form" f (cost=0.14..1.92 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=85,078)

  • Index Cond: (id = p."formId")
  • Heap Fetches: 0
  • Buffers: shared hit=85,078
73. 0.493 0.497 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=16) (actual time=0.497..0.497 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared read=1
74. 0.004 0.004 ↑ 1.0 4 1

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

  • Buffers: shared hit=1
75. 0.002 0.007 ↑ 1.0 3 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
76. 0.005 0.005 ↑ 1.0 3 1

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

  • Buffers: shared hit=1
77. 0.006 0.028 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=16) (actual time=0.027..0.028 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
78. 0.022 0.022 ↑ 1.0 4 1

Seq Scan on "MarketingFocus" mf (cost=0.00..1.04 rows=4 width=16) (actual time=0.006..0.022 rows=4 loops=1)

  • Buffers: shared hit=1
79. 0.001 23,878.273 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=82,561.71..82,832.55 rows=1 width=56) (actual time=23,878.273..23,878.273 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
80. 0.001 23,878.272 ↓ 0.0 0 1

Nested Loop (cost=82,561.71..82,832.54 rows=1 width=6,196) (actual time=23,878.272..23,878.272 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
81. 0.001 23,878.271 ↓ 0.0 0 1

Nested Loop (cost=82,561.57..82,832.13 rows=1 width=91) (actual time=23,878.271..23,878.271 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
82. 0.001 23,878.270 ↓ 0.0 0 1

Nested Loop (cost=82,561.44..82,831.98 rows=1 width=107) (actual time=23,878.270..23,878.270 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
83. 0.001 23,878.269 ↓ 0.0 0 1

Nested Loop (cost=82,561.31..82,831.82 rows=1 width=123) (actual time=23,878.269..23,878.269 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
84. 0.001 23,878.268 ↓ 0.0 0 1

Nested Loop (cost=82,561.18..82,831.66 rows=1 width=139) (actual time=23,878.267..23,878.268 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
85. 0.001 23,878.267 ↓ 0.0 0 1

Nested Loop (cost=82,561.04..82,831.49 rows=1 width=155) (actual time=23,878.266..23,878.267 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
86. 0.001 23,878.266 ↓ 0.0 0 1

Nested Loop (cost=82,560.91..82,831.32 rows=1 width=159) (actual time=23,878.266..23,878.266 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
87. 0.001 23,878.265 ↓ 0.0 0 1

Nested Loop (cost=82,560.77..82,830.96 rows=1 width=175) (actual time=23,878.264..23,878.265 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
88. 0.002 23,878.264 ↓ 0.0 0 1

Nested Loop (cost=82,560.63..82,830.80 rows=1 width=143) (actual time=23,878.263..23,878.264 rows=0 loops=1)

  • Join Filter: (sr_1."regionId" = r_1.id)
  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
89. 0.000 23,878.262 ↓ 0.0 0 1

Nested Loop (cost=82,560.63..82,829.66 rows=1 width=159) (actual time=23,878.262..23,878.262 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
90. 0.002 23,878.262 ↓ 0.0 0 1

Nested Loop (cost=82,560.49..82,829.28 rows=1 width=159) (actual time=23,878.261..23,878.262 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
91. 0.000 23,878.260 ↓ 0.0 0 1

Nested Loop (cost=82,560.35..82,829.12 rows=1 width=159) (actual time=23,878.260..23,878.260 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
92. 0.002 23,878.260 ↓ 0.0 0 1

Nested Loop (cost=82,560.22..82,828.57 rows=1 width=175) (actual time=23,878.259..23,878.260 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
93. 0.001 23,878.258 ↓ 0.0 0 1

Nested Loop (cost=82,560.08..82,828.28 rows=1 width=175) (actual time=23,878.258..23,878.258 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
94. 0.001 23,878.257 ↓ 0.0 0 1

Nested Loop (cost=82,559.94..82,828.07 rows=1 width=175) (actual time=23,878.257..23,878.257 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
95. 0.001 23,878.256 ↓ 0.0 0 1

Nested Loop (cost=82,559.79..82,827.90 rows=1 width=175) (actual time=23,878.256..23,878.256 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
96. 0.001 23,878.255 ↓ 0.0 0 1

Nested Loop (cost=82,559.51..82,827.53 rows=1 width=91) (actual time=23,878.255..23,878.255 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
97. 0.001 23,878.254 ↓ 0.0 0 1

Nested Loop (cost=82,559.22..82,827.21 rows=1 width=91) (actual time=23,878.254..23,878.254 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
98. 0.001 23,878.253 ↓ 0.0 0 1

Nested Loop (cost=82,558.94..82,825.99 rows=1 width=75) (actual time=23,878.253..23,878.253 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
99. 0.001 23,878.252 ↓ 0.0 0 1

Nested Loop (cost=82,558.81..82,825.17 rows=1 width=91) (actual time=23,878.252..23,878.252 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
100. 0.001 23,878.251 ↓ 0.0 0 1

Nested Loop (cost=82,558.68..82,824.29 rows=1 width=107) (actual time=23,878.251..23,878.251 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
101. 21.579 23,878.250 ↓ 0.0 0 1

Nested Loop (cost=82,558.55..82,823.46 rows=1 width=123) (actual time=23,878.250..23,878.250 rows=0 loops=1)

  • Buffers: shared hit=1,490,528, temp read=3,078 written=3,090
102. 9,338.480 23,845.371 ↓ 11,300.0 11,300 1

Nested Loop (cost=82,558.40..82,821.52 rows=1 width=139) (actual time=6,882.014..23,845.371 rows=11,300 loops=1)

  • Join Filter: (rf."marketProductVariantId" = mpvsbe."parentMarketProductVariantId")
  • Rows Removed by Join Filter: 22,820,221
  • Buffers: shared hit=1,479,228, temp read=3,078 written=3,090
103. 11.432 6,666.232 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,558.40..82,564.77 rows=3 width=144) (actual time=6,501.026..6,666.232 rows=6,639 loops=1)

  • Buffers: shared hit=1,479,169, temp read=3,078 written=3,090
104. 19.467 6,648.161 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,558.40..82,563.71 rows=3 width=148) (actual time=6,501.020..6,648.161 rows=6,639 loops=1)

  • Buffers: shared hit=1,479,168, temp read=3,078 written=3,090
105. 19.429 6,622.055 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,558.26..82,562.65 rows=3 width=164) (actual time=6,501.013..6,622.055 rows=6,639 loops=1)

  • Buffers: shared hit=1,465,890, temp read=3,078 written=3,090
106. 23.202 6,595.987 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,558.12..82,560.72 rows=3 width=164) (actual time=6,501.007..6,595.987 rows=6,639 loops=1)

  • Join Filter: (sr_2."regionId" = r_2.id)
  • Rows Removed by Join Filter: 19,187
  • Buffers: shared hit=1,452,612, temp read=3,078 written=3,090
107. 27.958 6,566.146 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,558.12..82,559.38 rows=3 width=180) (actual time=6,500.994..6,566.146 rows=6,639 loops=1)

  • Buffers: shared hit=1,452,611, temp read=3,078 written=3,090
108. 12.441 6,518.271 ↓ 2,213.0 6,639 1

Merge Join (cost=82,557.99..82,558.28 rows=3 width=180) (actual time=6,500.985..6,518.271 rows=6,639 loops=1)

  • Merge Cond: (m_2."currencyId" = c_2.id)
  • Buffers: shared hit=1,439,333, temp read=3,078 written=3,090
109. 10.386 6,505.739 ↓ 2,213.0 6,639 1

Sort (cost=82,555.08..82,555.08 rows=3 width=164) (actual time=6,500.918..6,505.739 rows=6,639 loops=1)

  • Sort Key: m_2."currencyId
  • Sort Method: quicksort Memory: 1,956kB
  • Buffers: shared hit=1,439,332, temp read=3,078 written=3,090
110. 10.393 6,495.353 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,546.00..82,555.05 rows=3 width=164) (actual time=6,326.237..6,495.353 rows=6,639 loops=1)

  • Buffers: shared hit=1,439,332, temp read=3,078 written=3,090
111. 15.413 6,478.321 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,545.86..82,554.58 rows=3 width=148) (actual time=6,326.230..6,478.321 rows=6,639 loops=1)

  • Join Filter: (pc_2."businessLineId" = bl_2.id)
  • Rows Removed by Join Filter: 14,091
  • Buffers: shared hit=1,426,054, temp read=3,078 written=3,090
112. 8.904 6,456.269 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,545.86..82,553.18 rows=3 width=164) (actual time=6,326.215..6,456.269 rows=6,639 loops=1)

  • Buffers: shared hit=1,426,053, temp read=3,078 written=3,090
113. 9.501 6,440.726 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,545.72..82,552.34 rows=3 width=164) (actual time=6,326.209..6,440.726 rows=6,639 loops=1)

  • Buffers: shared hit=1,412,775, temp read=3,078 written=3,090
114. 10.078 6,424.586 ↓ 2,213.0 6,639 1

Nested Loop (cost=82,545.58..82,551.70 rows=3 width=164) (actual time=6,326.204..6,424.586 rows=6,639 loops=1)

  • Buffers: shared hit=1,399,497, temp read=3,078 written=3,090
115. 40.703 6,407.869 ↓ 2,213.0 6,639 1

Merge Join (cost=82,545.43..82,548.80 rows=3 width=164) (actual time=6,326.186..6,407.869 rows=6,639 loops=1)

  • Merge Cond: (mpv_3.id = rf."marketProductVariantId")
  • Buffers: shared hit=1,386,219, temp read=3,078 written=3,090
116. 2.436 16.480 ↓ 14.1 2,168 1

Sort (cost=477.71..478.09 rows=154 width=132) (actual time=15.427..16.480 rows=2,168 loops=1)

  • Sort Key: mpv_3.id
  • Sort Method: quicksort Memory: 672kB
  • Buffers: shared hit=4,396
117. 1.881 14.044 ↓ 14.1 2,168 1

Nested Loop (cost=223.98..472.11 rows=154 width=132) (actual time=1.411..14.044 rows=2,168 loops=1)

  • Buffers: shared hit=4,396
118. 4.092 8.858 ↓ 14.7 661 1

Hash Join (cost=223.56..431.50 rows=45 width=116) (actual time=1.399..8.858 rows=661 loops=1)

  • Hash Cond: (pv_2."productId" = p_2.id)
  • Buffers: shared hit=229
119. 3.386 3.386 ↑ 1.0 9,023 1

Seq Scan on "ProductVariant" pv_2 (cost=0.00..184.23 rows=9,023 width=32) (actual time=0.007..3.386 rows=9,023 loops=1)

  • Buffers: shared hit=94
120. 0.273 1.380 ↓ 21.6 541 1

Hash (cost=223.25..223.25 rows=25 width=132) (actual time=1.380..1.380 rows=541 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 91kB
  • Buffers: shared hit=135
121. 1.107 1.107 ↓ 21.6 541 1

Seq Scan on "Product" p_2 (cost=0.00..223.25 rows=25 width=132) (actual time=0.006..1.107 rows=541 loops=1)

  • Filter: ((type)::text = 'salesBundle'::text)
  • Rows Removed by Filter: 4,502
  • Buffers: shared hit=135
122. 3.305 3.305 ↑ 1.3 3 661

Index Scan using marketproductvariant_productvariantid_marketid_unique on "MarketProductVariant" mpv_3 (cost=0.41..0.86 rows=4 width=48) (actual time=0.002..0.005 rows=3 loops=661)

  • Index Cond: ("productVariantId" = pv_2.id)
  • Buffers: shared hit=4,167
123. 138.131 6,350.686 ↓ 178.4 91,717 1

Sort (cost=82,067.72..82,069.01 rows=514 width=32) (actual time=6,310.728..6,350.686 rows=91,717 loops=1)

  • Sort Key: rf."marketProductVariantId
  • Sort Method: external sort Disk: 3,776kB
  • Buffers: shared hit=1,381,823, temp read=3,078 written=3,090
124. 75.438 6,212.555 ↓ 178.4 91,717 1

Subquery Scan on rf (cost=82,031.73..82,044.58 rows=514 width=32) (actual time=5,596.636..6,212.555 rows=91,717 loops=1)

  • Buffers: shared hit=1,381,823, temp read=2,134 written=2,145
125. 263.947 6,137.117 ↓ 178.4 91,717 1

Group (cost=82,031.73..82,039.44 rows=514 width=96) (actual time=5,596.635..6,137.117 rows=91,717 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=1,381,823, temp read=2,134 written=2,145
126.          

Initplan (for Group)

127. 0.003 0.021 ↑ 1.0 1 1

Limit (cost=1.07..1.08 rows=1 width=24) (actual time=0.019..0.021 rows=1 loops=1)

  • Buffers: shared hit=1
128. 0.010 0.018 ↑ 5.0 1 1

Sort (cost=1.07..1.09 rows=5 width=24) (actual time=0.017..0.018 rows=1 loops=1)

  • Sort Key: fi_3."importedAt" DESC
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=1
129. 0.008 0.008 ↑ 1.0 5 1

Seq Scan on "ForecastImport" fi_3 (cost=0.00..1.05 rows=5 width=24) (actual time=0.005..0.008 rows=5 loops=1)

  • Buffers: shared hit=1
130. 892.905 5,873.149 ↓ 892.2 458,585 1

Sort (cost=82,030.65..82,031.94 rows=514 width=32) (actual time=5,596.630..5,873.149 rows=458,585 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: 17,072kB
  • Buffers: shared hit=1,381,823, temp read=2,134 written=2,145
131. 1,129.618 4,980.244 ↓ 892.2 458,585 1

Nested Loop (cost=36,898.77..82,007.51 rows=514 width=32) (actual time=14.813..4,980.244 rows=458,585 loops=1)

  • Buffers: shared hit=1,381,823
132. 687.612 2,016.286 ↓ 1,784.4 458,585 1

Hash Full Join (cost=36,882.65..76,822.78 rows=257 width=56) (actual time=14.797..2,016.286 rows=458,585 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: 442,335
  • Buffers: shared hit=2,898
133. 872.020 1,319.617 ↓ 1.0 900,920 1

Nested Loop (cost=4,081.10..27,293.69 rows=880,435 width=28) (actual time=5.669..1,319.617 rows=900,920 loops=1)

  • Buffers: shared hit=2,743
134. 81.749 87.229 ↓ 1.0 180,184 1

Bitmap Heap Scan on "MonthlyMarketProductVariantDemand" m_3 (cost=4,081.10..16,287.19 rows=176,087 width=28) (actual time=5.659..87.229 rows=180,184 loops=1)

  • Recheck Cond: ("forecastImportId" = $1)
  • Heap Blocks: exact=2,048
  • Buffers: shared hit=2,742
135. 5.480 5.480 ↓ 1.0 180,184 1

Bitmap Index Scan on monthlymarketproductvariantdemand_forecastimportid_index (cost=0.00..4,037.08 rows=176,087 width=0) (actual time=5.480..5.480 rows=180,184 loops=1)

  • Index Cond: ("forecastImportId" = $1)
  • Buffers: shared hit=694
136. 360.360 360.368 ↑ 1.0 5 180,184

Materialize (cost=0.00..1.07 rows=5 width=0) (actual time=0.000..0.002 rows=5 loops=180,184)

  • Buffers: shared hit=1
137. 0.008 0.008 ↑ 1.0 5 1

Seq Scan on "ForecastImport" fi_1 (cost=0.00..1.05 rows=5 width=0) (actual time=0.005..0.008 rows=5 loops=1)

  • Buffers: shared hit=1
138. 0.000 9.057 ↓ 0.0 0 1

Hash (cost=32,649.74..32,649.74 rows=8,675 width=28) (actual time=9.056..9.057 rows=0 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 128kB
  • Buffers: shared hit=155
139. 9.022 9.118 ↓ 0.0 0 1

Gather (cost=1,041.75..32,649.74 rows=8,675 width=28) (actual time=9.055..9.118 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=155
140. 0.086 0.096 ↓ 0.0 0 3 / 3

Hash Join (cost=41.75..30,782.24 rows=3,615 width=28) (actual time=0.096..0.096 rows=0 loops=3)

  • Hash Cond: ((forecast_1."forecastImportId" = abf_1."forecastImportId") AND (forecast_1.year = abf_1.year))
  • Buffers: shared hit=155
141. 0.005 0.005 ↑ 722,915.0 1 3 / 3

Parallel Seq Scan on "MonthlyMarketProductVariantForecast" forecast_1 (cost=0.00..26,945.15 rows=722,915 width=44) (actual time=0.004..0.005 rows=1 loops=3)

  • Buffers: shared hit=3
142. 0.001 0.005 ↓ 0.0 0 3 / 3

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 16kB
143. 0.004 0.004 ↓ 0.0 0 3 / 3

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

144. 458.585 1,834.340 ↑ 2.0 1 458,585

Bitmap Heap Scan on "MarketProductVariant" mpv_4 (cost=16.12..20.15 rows=2 width=16) (actual time=0.004..0.004 rows=1 loops=458,585)

  • Recheck Cond: ((forecast_1."marketProductVariantId" = id) OR (m_3."marketProductVariantId" = id))
  • Heap Blocks: exact=458,585
  • Buffers: shared hit=1,378,925
145. 917.170 1,375.755 ↓ 0.0 0 458,585

BitmapOr (cost=16.12..16.12 rows=2 width=0) (actual time=0.003..0.003 rows=0 loops=458,585)

  • Buffers: shared hit=920,340
146. 0.000 0.000 ↓ 0.0 0 458,585

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.30 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=458,585)

  • Index Cond: (forecast_1."marketProductVariantId" = id)
147. 458.585 458.585 ↑ 1.0 1 458,585

Bitmap Index Scan on "MarketProductVariant_pkey" (cost=0.00..0.30 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=458,585)

  • Index Cond: (m_3."marketProductVariantId" = id)
  • Buffers: shared hit=920,340
148. 6.639 6.639 ↑ 1.0 1 6,639

Index Scan using industrycut_new_id_index on "IndustryCut" ic_2 (cost=0.14..0.96 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=6,639)

  • Index Cond: (id = p_2."industryCutId")
  • Buffers: shared hit=13,278
149. 6.639 6.639 ↑ 1.0 1 6,639

Index Scan using productsubcategory_new_id_index on "ProductSubcategory" psc_2 (cost=0.14..0.21 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=6,639)

  • Index Cond: (id = ic_2."productSubcategoryId")
  • Buffers: shared hit=13,278
150. 6.639 6.639 ↑ 1.0 1 6,639

Index Scan using productcategory_new_id_index on "ProductCategory" pc_2 (cost=0.14..0.28 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=6,639)

  • Index Cond: (id = psc_2."productCategoryId")
  • Buffers: shared hit=13,278
151. 6.631 6.639 ↑ 2.3 3 6,639

Materialize (cost=0.00..1.10 rows=7 width=16) (actual time=0.000..0.001 rows=3 loops=6,639)

  • Buffers: shared hit=1
152. 0.008 0.008 ↑ 1.0 7 1

Seq Scan on "BusinessLine" bl_2 (cost=0.00..1.07 rows=7 width=16) (actual time=0.004..0.008 rows=7 loops=1)

  • Buffers: shared hit=1
153. 6.639 6.639 ↑ 1.0 1 6,639

Index Scan using market_new_id_index on "Market" m_2 (cost=0.14..0.16 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=6,639)

  • Index Cond: (id = mpv_3."marketId")
  • Buffers: shared hit=13,278
154. 0.066 0.091 ↑ 1.0 50 1

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

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

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

  • Buffers: shared hit=1
156. 19.917 19.917 ↑ 1.0 1 6,639

Index Scan using subregion_new_id_index on "Subregion" sr_2 (cost=0.14..0.36 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=6,639)

  • Index Cond: (id = m_2."subregionId")
  • Buffers: shared hit=13,278
157. 6.633 6.639 ↑ 1.5 4 6,639

Materialize (cost=0.00..1.09 rows=6 width=16) (actual time=0.000..0.001 rows=4 loops=6,639)

  • Buffers: shared hit=1
158. 0.006 0.006 ↑ 1.0 6 1

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

  • Buffers: shared hit=1
159. 6.639 6.639 ↑ 1.0 1 6,639

Index Scan using subbrand_new_id_index on "SubBrand" sb_2 (cost=0.14..0.64 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=6,639)

  • Index Cond: (id = p_2."subBrandId")
  • Buffers: shared hit=13,278
160. 6.639 6.639 ↑ 1.0 1 6,639

Index Only Scan using brand_new_id_index on "Brand" b_2 (cost=0.14..0.35 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=6,639)

  • Index Cond: (id = sb_2."brandId")
  • Heap Fetches: 6,639
  • Buffers: shared hit=13,278
161. 6.635 6.639 ↑ 1.0 1 6,639

Materialize (cost=0.00..1.03 rows=1 width=32) (actual time=0.000..0.001 rows=1 loops=6,639)

  • Buffers: shared hit=1
162. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on "ProductType" pt_2 (cost=0.00..1.02 rows=1 width=32) (actual time=0.003..0.004 rows=1 loops=1)

  • Filter: (name = 'salesBundle'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1
163. 7,839.161 7,840.659 ↑ 1.0 3,439 6,639

Materialize (cost=0.00..110.59 rows=3,439 width=43) (actual time=0.000..1.181 rows=3,439 loops=6,639)

  • Buffers: shared hit=59
164. 1.498 1.498 ↑ 1.0 3,439 1

Seq Scan on "MarketProductVariantSalesBundleEntry" mpvsbe (cost=0.00..93.39 rows=3,439 width=43) (actual time=0.004..1.498 rows=3,439 loops=1)

  • Buffers: shared hit=59
165. 11.300 11.300 ↓ 0.0 0 11,300

Index Only Scan using "Form_pkey" on "Form" f_2 (cost=0.14..1.92 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=11,300)

  • Index Cond: (id = p_2."formId")
  • Heap Fetches: 0
  • Buffers: shared hit=11,300
166. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "Demographic_pkey" on "Demographic" d_2 (cost=0.13..0.63 rows=1 width=16) (never executed)

  • Index Cond: (id = p_2."demographicId")
  • Heap Fetches: 0
167. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "MarketingManaged_pkey" on "MarketingManaged" mm_2 (cost=0.13..0.63 rows=1 width=16) (never executed)

  • Index Cond: (id = p_2."marketingManagedId")
  • Heap Fetches: 0
168. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "MarketingFocus_pkey" on "MarketingFocus" mf_2 (cost=0.13..0.63 rows=1 width=16) (never executed)

  • Index Cond: (id = p_2."marketingFocusId")
  • Heap Fetches: 0
169. 0.000 0.000 ↓ 0.0 0

Index Scan using "MarketProductVariant_pkey" on "MarketProductVariant" mpv_2 (cost=0.29..1.22 rows=1 width=48) (never executed)

  • Index Cond: (id = mpvsbe."marketProductVariantId")
170. 0.000 0.000 ↓ 0.0 0

Index Scan using "ProductVariant_pkey" on "ProductVariant" pv_1 (cost=0.29..0.32 rows=1 width=32) (never executed)

  • Index Cond: (id = mpv_2."productVariantId")
171. 0.000 0.000 ↓ 0.0 0

Index Scan using "Product_pkey" on "Product" p_1 (cost=0.28..0.37 rows=1 width=132) (never executed)

  • Index Cond: (id = pv_1."productId")
172. 0.000 0.000 ↓ 0.0 0

Index Scan using industrycut_new_id_index on "IndustryCut" ic_1 (cost=0.14..0.17 rows=1 width=32) (never executed)

  • Index Cond: (id = p_1."industryCutId")
173. 0.000 0.000 ↓ 0.0 0

Index Scan using productsubcategory_new_id_index on "ProductSubcategory" psc_1 (cost=0.14..0.21 rows=1 width=32) (never executed)

  • Index Cond: (id = ic_1."productSubcategoryId")
174. 0.000 0.000 ↓ 0.0 0

Index Scan using productcategory_new_id_index on "ProductCategory" pc_1 (cost=0.14..0.28 rows=1 width=32) (never executed)

  • Index Cond: (id = psc_1."productCategoryId")
175. 0.000 0.000 ↓ 0.0 0

Index Only Scan using businessline_new_id_index on "BusinessLine" bl_1 (cost=0.13..0.47 rows=1 width=16) (never executed)

  • Index Cond: (id = pc_1."businessLineId")
  • Heap Fetches: 0
176. 0.000 0.000 ↓ 0.0 0

Index Scan using market_new_id_index on "Market" (cost=0.14..0.16 rows=1 width=32) (never executed)

  • Index Cond: (id = mpv_2."marketId")
  • Filter: (NOT "isHidden")
177. 0.000 0.000 ↓ 0.0 0

Index Scan using subregion_new_id_index on "Subregion" sr_1 (cost=0.14..0.36 rows=1 width=32) (never executed)

  • Index Cond: (id = "Market"."subregionId")
178. 0.000 0.000 ↓ 0.0 0

Seq Scan on "Region" r_1 (cost=0.00..1.06 rows=6 width=16) (never executed)

179. 0.000 0.000 ↓ 0.0 0

Index Scan using subbrand_new_id_index on "SubBrand" sb_1 (cost=0.14..0.16 rows=1 width=48) (never executed)

  • Index Cond: (id = p_1."subBrandId")
180. 0.000 0.000 ↓ 0.0 0

Index Only Scan using brand_new_id_index on "Brand" b_1 (cost=0.14..0.35 rows=1 width=16) (never executed)

  • Index Cond: (id = sb_1."brandId")
  • Heap Fetches: 0
181. 0.000 0.000 ↓ 0.0 0

Index Only Scan using producttype_name_unique on "ProductType" pt_1 (cost=0.13..0.15 rows=1 width=32) (never executed)

  • Index Cond: (name = (p_1.type)::text)
  • Heap Fetches: 0
182. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "Form_pkey" on "Form" f_1 (cost=0.14..0.17 rows=1 width=16) (never executed)

  • Index Cond: (id = p_1."formId")
  • Heap Fetches: 0
183. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "Demographic_pkey" on "Demographic" d_1 (cost=0.13..0.15 rows=1 width=16) (never executed)

  • Index Cond: (id = p_1."demographicId")
  • Heap Fetches: 0
184. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "MarketingManaged_pkey" on "MarketingManaged" mm_1 (cost=0.13..0.15 rows=1 width=16) (never executed)

  • Index Cond: (id = p_1."marketingManagedId")
  • Heap Fetches: 0
185. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "MarketingFocus_pkey" on "MarketingFocus" mf_1 (cost=0.13..0.15 rows=1 width=16) (never executed)

  • Index Cond: (id = p_1."marketingFocusId")
  • Heap Fetches: 0
186. 0.000 0.000 ↓ 0.0 0

Index Scan using "Currency_pkey" on "Currency" c_1 (cost=0.14..0.36 rows=1 width=20) (never executed)

  • Index Cond: (id = m_2."currencyId")
Planning time : 14.573 ms
Execution time : 28,872.608 ms