explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rtEWD

Settings
# exclusive inclusive rows x rows loops node
1. 27.025 9,677.265 ↓ 2.0 400 1

GroupAggregate (cost=11,669,337.24..11,669,349.58 rows=200 width=556) (actual time=9,624.945..9,677.265 rows=400 loops=1)

  • Group Key: "*SELECT* 1"."productCategoryId", "*SELECT* 1"."productCategoryName", "*SELECT* 1".year, "*SELECT* 1".month
  • Buffers: shared hit=1,186,135 read=6,066, temp read=3,303 written=3,305
2. 297.851 9,650.240 ↓ 161.5 95,473 1

Sort (cost=11,669,337.24..11,669,338.72 rows=591 width=556) (actual time=9,624.863..9,650.240 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,186,135 read=6,066, temp read=3,303 written=3,305
3. 13.115 9,352.389 ↓ 161.5 95,473 1

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

  • Buffers: shared hit=1,186,129 read=6,066, temp read=2,610 written=2,611
4. 19.019 4,697.323 ↓ 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=4,244.002..4,697.323 rows=86,885 loops=1)

  • Buffers: shared hit=421,875 read=5,910, temp read=1,733 written=1,732
5. 111.255 4,678.304 ↓ 153.8 86,885 1

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

  • Hash Cond: (p."marketingFocusId" = mf.id)
  • Buffers: shared hit=421,875 read=5,910, temp read=1,733 written=1,732
6. 27.192 4,565.538 ↓ 153.8 86,885 1

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

  • Hash Cond: (p."marketingManagedId" = mm.id)
  • Buffers: shared hit=421,875 read=5,909, temp read=1,733 written=1,732
7. 27.785 4,537.105 ↓ 153.8 86,885 1

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

  • Hash Cond: (p."demographicId" = d.id)
  • Buffers: shared hit=421,875 read=5,908, temp read=1,733 written=1,732
8. 28.631 4,508.127 ↓ 153.8 86,885 1

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

  • Hash Cond: (p."formId" = f.id)
  • Buffers: shared hit=421,875 read=5,907, temp read=1,733 written=1,732
9. 18.215 4,478.195 ↓ 153.8 86,885 1

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

  • Buffers: shared hit=421,875 read=5,906, temp read=1,733 written=1,732
10. 2.506 2.506 ↑ 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=2.500..2.506 rows=1 loops=1)

  • Index Cond: (name = 'finishedGood'::text)
  • Heap Fetches: 1
  • Buffers: shared read=2
11. 32.610 4,457.474 ↓ 153.8 86,885 1

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

  • Hash Cond: (p."subBrandId" = sb.id)
  • Buffers: shared hit=421,875 read=5,904, temp read=1,733 written=1,732
12. 32.352 4,423.246 ↓ 153.8 86,885 1

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

  • Hash Cond: (mpv."marketId" = m.id)
  • Buffers: shared hit=421,873 read=5,903, temp read=1,733 written=1,732
13. 80.043 4,388.207 ↓ 153.8 86,885 1

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

  • Hash Cond: (mpv_1.id = mpv.id)
  • Buffers: shared hit=421,869 read=5,901, temp read=1,733 written=1,732
14. 58.229 1,992.210 ↑ 1.2 94,087 1

Group (cost=5,813,934.62..5,816,797.42 rows=114,512 width=96) (actual time=1,915.814..1,992.210 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=378,798 read=3,603, temp read=1,121 written=1,122
15.          

Initplan (for Group)

16. 0.003 0.889 ↑ 1.0 1 1

Limit (cost=33.55..33.55 rows=1 width=24) (actual time=0.888..0.889 rows=1 loops=1)

  • Buffers: shared hit=3 read=1
17. 0.068 0.886 ↑ 1,570.0 1 1

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

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

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

  • Buffers: shared read=1
19. 260.303 1,933.092 ↑ 1.2 94,087 1

Sort (cost=5,813,901.07..5,814,187.35 rows=114,512 width=38) (actual time=1,915.804..1,933.092 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=378,798 read=3,603, temp read=1,121 written=1,122
20. 48.383 1,672.789 ↑ 1.2 94,087 1

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

  • Buffers: shared hit=378,798 read=3,603
21. 94.457 307.188 ↓ 1.6 94,087 1

Hash Full Join (cost=3,194.44..4,669,995.51 rows=57,257 width=56) (actual time=105.426..307.188 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=4 read=2,764
22. 58.372 109.395 ↑ 1,570.8 124,880 1

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

  • Buffers: shared hit=4 read=1,421
23. 51.023 51.023 ↑ 1.0 124,880 1

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

  • Filter: ("forecastImportId" = $0)
  • Buffers: shared hit=3 read=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.004 0.004 ↑ 1,570.0 1 1

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

  • Buffers: shared hit=1
26. 10.983 103.336 ↓ 51.7 30,500 1

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

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

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

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

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

  • Buffers: shared read=1,342
29. 0.005 0.819 ↑ 1,270.0 1 1

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

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

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

  • Buffers: shared read=1
31. 94.087 1,317.218 ↑ 2.0 1 94,087

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

  • Recheck Cond: ((forecast."marketProductVariantId" = id) OR (m_1."marketProductVariantId" = id))
  • Heap Blocks: exact=94,087
  • Buffers: shared hit=378,794 read=839
32. 94.087 1,223.131 ↓ 0.0 0 94,087

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

  • Buffers: shared hit=284,708 read=839
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. 1,034.957 1,034.957 ↑ 1.0 1 94,087

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

  • Index Cond: (m_1."marketProductVariantId" = id)
  • Buffers: shared hit=192,040 read=839
35. 20.868 2,315.954 ↓ 188.0 27,452 1

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

  • Buckets: 32,768 (originally 1024) Batches: 2 (originally 1) Memory Usage: 3,841kB
  • Buffers: shared hit=43,071 read=2,298, temp written=280
36. 15.723 2,295.086 ↓ 188.0 27,452 1

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

  • Buffers: shared hit=43,071 read=2,298
37. 3.256 77.499 ↓ 186.9 8,036 1

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

  • Hash Cond: (pc."businessLineId" = bl.id)
  • Buffers: shared hit=14 read=305
38. 3.690 72.853 ↓ 186.9 8,036 1

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

  • Hash Cond: (psc."productCategoryId" = pc.id)
  • Buffers: shared hit=14 read=304
39. 3.656 67.778 ↓ 186.9 8,036 1

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

  • Hash Cond: (ic."productSubcategoryId" = psc.id)
  • Buffers: shared hit=14 read=303
40. 3.765 64.078 ↓ 186.9 8,036 1

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

  • Hash Cond: (p."industryCutId" = ic.id)
  • Buffers: shared hit=13 read=303
41. 6.229 60.216 ↓ 186.9 8,036 1

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

  • Hash Cond: (pv."productId" = p.id)
  • Buffers: shared hit=10 read=303
42. 13.758 13.758 ↓ 1.0 8,699 1

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

  • Buffers: shared hit=4 read=86
43. 9.247 40.229 ↓ 179.8 4,315 1

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

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

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

  • Filter: ((type)::text = 'finishedGood'::text)
  • Rows Removed by Filter: 549
  • Buffers: shared hit=6 read=217
45. 0.050 0.097 ↑ 1.0 227 1

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

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

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

  • Buffers: shared hit=3
47. 0.023 0.044 ↑ 1.0 100 1

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

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

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

  • Buffers: shared hit=1
49. 0.016 1.385 ↑ 3.7 38 1

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

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

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

  • Buffers: shared read=1
51. 0.007 1.390 ↑ 20.0 7 1

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

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

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

  • Buffers: shared read=1
53. 2,201.864 2,201.864 ↑ 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.162..0.274 rows=3 loops=8,036)

  • Index Cond: ("productVariantId" = pv.id)
  • Buffers: shared hit=43,057 read=1,993
54. 0.098 2.687 ↑ 1.0 58 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=4 read=2
55. 0.028 2.589 ↑ 1.0 58 1

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

  • Hash Cond: (m."currencyId" = c.id)
  • Buffers: shared hit=4 read=2
56. 0.042 2.534 ↑ 1.0 59 1

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

  • Hash Cond: (sr."regionId" = r.id)
  • Buffers: shared hit=3 read=2
57. 0.030 1.364 ↑ 1.0 59 1

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

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

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

  • Buffers: shared hit=3
59. 0.009 1.310 ↑ 10.0 14 1

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

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

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

  • Buffers: shared read=1
61. 0.007 1.128 ↓ 1.2 6 1

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

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

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

  • Buffers: shared read=1
63. 0.014 0.027 ↑ 1.0 50 1

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

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

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

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

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=2 read=1
66. 0.026 1.604 ↑ 1.0 63 1

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

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

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

  • Buffers: shared hit=2
68. 0.013 1.558 ↑ 4.2 33 1

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

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

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

  • Buffers: shared read=1
70. 0.007 1.301 ↑ 23.3 6 1

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

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

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

  • Buffers: shared read=1
72. 0.007 1.193 ↑ 35.0 4 1

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

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

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

  • Buffers: shared read=1
74. 0.007 1.241 ↑ 46.7 3 1

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

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

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

  • Buffers: shared read=1
76. 0.010 1.511 ↑ 35.0 4 1

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

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

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

  • Buffers: shared read=1
78. 2.181 4,641.951 ↓ 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,021.350..4,641.951 rows=8,588 loops=1)

  • Buffers: shared hit=764,254 read=156, temp read=877 written=879
79. 20.426 4,639.770 ↓ 330.3 8,588 1

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

  • Hash Cond: (m_2."currencyId" = c_1.id)
  • Buffers: shared hit=764,254 read=156, temp read=877 written=879
80. 6.367 4,619.304 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=764,253 read=156, temp read=877 written=879
81. 6.984 4,595.761 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=747,077 read=156, temp read=877 written=879
82. 6.838 4,571.601 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=729,901 read=156, temp read=877 written=879
83. 7.591 4,547.587 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=712,725 read=156, temp read=877 written=879
84. 11.695 4,522.820 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=695,549 read=156, temp read=877 written=879
85. 11.572 4,502.537 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=678,374 read=155, temp read=877 written=879
86. 8.607 4,482.377 ↓ 330.3 8,588 1

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

  • Join Filter: (sr_1."regionId" = r_1.id)
  • Rows Removed by Join Filter: 20,772
  • Buffers: shared hit=661,198 read=155, temp read=877 written=879
87. 5.648 4,473.770 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=661,197 read=155, temp read=877 written=879
88. 8.550 4,450.946 ↓ 330.3 8,588 1

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

  • Buffers: shared hit=644,022 read=154, temp read=877 written=879
89. 11.506 4,425.220 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=626,846 read=154, temp read=877 written=879
90. 3.929 4,405.126 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=609,671 read=153, temp read=877 written=879
91. 11.389 4,384.021 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=592,496 read=152, temp read=877 written=879
92. 5.052 4,364.044 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=575,320 read=152, temp read=877 written=879
93. 10.808 4,341.816 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=558,144 read=152, temp read=877 written=879
94. 6.171 4,270.892 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=532,415 read=117, temp read=877 written=879
95. 3.864 4,196.017 ↓ 214.7 8,588 1

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

  • Buffers: shared hit=506,656 read=76, temp read=877 written=879
96. 6.987 4,174.977 ↓ 209.5 8,588 1

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

  • Buffers: shared hit=489,480 read=76, temp read=877 written=879
97. 5.620 4,142.226 ↓ 209.5 8,588 1

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

  • Buffers: shared hit=455,106 read=76, temp read=877 written=879
98. 5.909 4,119.430 ↓ 209.5 8,588 1

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

  • Buffers: shared hit=437,931 read=75, temp read=877 written=879
99. 5.188 4,096.345 ↓ 209.5 8,588 1

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

  • Buffers: shared hit=420,756 read=74, temp read=877 written=879
100. 11.186 4,073.981 ↓ 209.5 8,588 1

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

  • Buffers: shared hit=403,581 read=73, temp read=877 written=879
101. 1,872.669 4,045.619 ↓ 209.5 8,588 1

Nested Loop (cost=5,829,460.30..5,849,394.99 rows=41 width=139) (actual time=1,009.088..4,045.619 rows=8,588 loops=1)

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

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

  • Buffers: shared hit=386,406 read=4, temp read=877 written=879
103. 49.114 1,167.839 ↓ 12.7 7,202 1

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=3
110. 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
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.004..0.006 rows=14 loops=1)

  • Buffers: shared hit=1
112. 0.004 0.010 ↓ 1.2 6 1

Hash (cost=1.05..1.05 rows=5 width=16) (actual time=0.010..0.010 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.033 0.040 ↑ 1.0 50 1

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

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

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

  • Buffers: shared hit=1
116. 33.056 1,017.494 ↓ 12.7 7,202 58

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

  • Buffers: shared hit=386,395 read=4, temp read=877 written=879
117. 15.586 984.438 ↓ 12.7 7,202 1

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

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

Sort (cost=5,828,767.87..5,829,054.15 rows=114,512 width=32) (actual time=932.981..949.726 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. 15.853 866.215 ↑ 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=804.917..866.215 rows=94,087 loops=1)

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

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

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

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

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

  • Sort Key: fi_3."importedAt" DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1
124. 0.002 0.002 ↑ 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.002 rows=1 loops=1)

  • Buffers: shared hit=1
125. 212.325 821.528 ↑ 1.2 94,087 1

Sort (cost=5,813,509.07..5,813,795.35 rows=114,512 width=32) (actual time=804.911..821.528 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. 109.301 609.203 ↑ 1.2 94,087 1

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

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

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

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

  • Buffers: shared hit=1,422
129. 29.097 29.097 ↑ 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.030..29.097 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. 7.937 45.351 ↓ 51.7 30,500 1

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

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

Hash Join (cost=41.75..3,184.12 rows=590 width=28) (actual time=0.024..37.414 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. 11.443 11.443 ↑ 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.004..11.443 rows=118,009 loops=1)

  • Buffers: shared hit=1,342
135. 0.003 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
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. 0.000 282.261 ↑ 2.0 1 94,087

Bitmap Heap Scan on "MarketProductVariant" mpv_4 (cost=15.71..19.74 rows=2 width=16) (actual time=0.003..0.003 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.922 19.126 ↓ 57.6 8,416 1

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

  • Sort Key: mpv_3.id
  • Sort Method: quicksort Memory: 672kB
  • Buffers: shared hit=3,996 read=4
142. 0.540 17.204 ↓ 14.8 2,168 1

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

  • Buffers: shared hit=3,996 read=4
143. 0.237 5.393 ↓ 15.4 663 1

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

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=90
149. 0.207 1.755 ↓ 22.9 549 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Buffers: shared hit=1
157. 0.006 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.010 0.010 ↑ 20.0 7 1

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

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

  • Index Cond: ("productVariantId" = pv_2.id)
  • Buffers: shared hit=3,682 read=4
160. 35.926 36.010 ↑ 1.0 63 7,202

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

  • Buffers: shared hit=3
161. 0.038 0.084 ↑ 1.0 63 1

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

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

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

  • Buffers: shared hit=2
163. 0.011 0.021 ↑ 4.2 33 1

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

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

Seq Scan on "Brand" b_2 (cost=0.00..11.40 rows=140 width=16) (actual time=0.006..0.010 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.026 0.026 ↑ 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.023..0.026 rows=1 loops=1)

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

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

  • Buffers: shared read=68
168. 16.189 16.189 ↑ 1.0 2,148 1

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

  • Buffers: shared read=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,175 read=1
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,175 read=1
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. 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,175 read=1
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. 68.704 68.704 ↑ 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.008..0.008 rows=1 loops=8,588)

  • Index Cond: (id = mpv_2."productVariantId")
  • Buffers: shared hit=25,759 read=41
176. 60.116 60.116 ↑ 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.007..0.007 rows=1 loops=8,588)

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

  • Index Cond: (id = psc_1."productCategoryId")
  • Buffers: shared hit=17,175 read=1
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,175 read=1
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,175 read=1
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.009 0.009 ↑ 1.0 5 1

Seq Scan on "Region" r_1 (cost=0.00..1.05 rows=5 width=16) (actual time=0.007..0.009 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.017 0.040 ↑ 1.0 50 1

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

  • Buffers: shared hit=1
Planning time : 28.579 ms
Execution time : 9,682.487 ms