explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m4tzH

Settings
# exclusive inclusive rows x rows loops node
1. 0.180 21,621.406 ↑ 3.3 732 1

Append (cost=83,289.51..368,205.09 rows=2,408 width=72) (actual time=0.002..21,621.406 rows=732 loops=1)

2.          

CTE filtered_products

3. 78.950 85.472 ↓ 2.3 36,713 1

Bitmap Heap Scan on products (cost=7,124.27..82,721.06 rows=16,241 width=158) (actual time=10.870..85.472 rows=36,713 loops=1)

  • Recheaz\zzzzck Cond: (visible AND "visibleInLists")
  • Filter: ("existsInSupplierPrice" AND ((quantity > 5) OR "onDemand" OR ("beingDeliveredCount" > 0)))
  • Rows Removed by Filter: 9398
  • Heap Blocks: exact=26831
4. 6.522 6.522 ↓ 1.2 46,111 1

Bitmap Index Scan on get_products_where_idx (cost=0.00..7,120.20 rows=39,823 width=0) (actual time=6.522..6.522 rows=46,111 loops=1)

  • Index Cond: ("existsInSupplierPrice" = true)
5.          

CTE aggregations

6. 10.908 125.284 ↑ 1.0 1 1

Aggregate (cost=568.43..568.44 rows=1 width=24) (actual time=125.284..125.284 rows=1 loops=1)

7. 114.376 114.376 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_12 (cost=0.00..324.82 rows=16,241 width=12) (actual time=10.876..114.376 rows=36,713 loops=1)

8. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=72) (actual time=0.001..0.001 rows=1 loops=1)

9. 0.002 125.289 ↑ 1.0 1 1

Subquery Scan on *SELECT* 2 (cost=0.00..0.03 rows=1 width=72) (actual time=125.288..125.289 rows=1 loops=1)

10. 125.287 125.287 ↑ 1.0 1 1

CTE Scan on aggregations (cost=0.00..0.02 rows=1 width=68) (actual time=125.286..125.287 rows=1 loops=1)

11. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan on *SELECT* 3 (cost=0.00..0.03 rows=1 width=72) (actual time=0.002..0.002 rows=1 loops=1)

12. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on aggregations aggregations_1 (cost=0.00..0.02 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=1)

13. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan on *SELECT* 4 (cost=0.00..0.03 rows=1 width=72) (actual time=0.001..0.002 rows=1 loops=1)

14. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on aggregations aggregations_2 (cost=0.00..0.02 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=1)

15. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan on *SELECT* 5 (cost=0.00..0.03 rows=1 width=72) (actual time=0.001..0.002 rows=1 loops=1)

16. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on aggregations aggregations_3 (cost=0.00..0.02 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=1)

17. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan on *SELECT* 6 (cost=0.00..0.03 rows=1 width=72) (actual time=0.001..0.002 rows=1 loops=1)

18. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on aggregations aggregations_4 (cost=0.00..0.02 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=1)

19. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan on *SELECT* 7 (cost=0.00..0.03 rows=1 width=72) (actual time=0.001..0.002 rows=1 loops=1)

20. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on aggregations aggregations_5 (cost=0.00..0.02 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=1)

21. 0.001 0.002 ↑ 1.0 1 1

Subquery Scan on *SELECT* 8 (cost=0.00..0.03 rows=1 width=72) (actual time=0.001..0.002 rows=1 loops=1)

22. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on aggregations aggregations_6 (cost=0.00..0.02 rows=1 width=68) (actual time=0.001..0.001 rows=1 loops=1)

23. 7.438 190.844 ↑ 25.0 8 1

HashAggregate (cost=9,140.36..9,142.36 rows=200 width=58) (actual time=190.842..190.844 rows=8 loops=1)

  • Group Key: stocks.name
24. 45.058 183.406 ↓ 3.7 22,775 1

HashAggregate (cost=8,985.36..9,047.36 rows=6,200 width=50) (actual time=177.337..183.406 rows=22,775 loops=1)

  • Group Key: stocks.name, filtered_products.__group
25. 36.517 138.348 ↓ 1.6 79,717 1

Hash Join (cost=6,896.26..8,735.62 rows=49,948 width=50) (actual time=93.128..138.348 rows=79,717 loops=1)

  • Hash Cond: (filtered_products._id = stocks."productId")
26. 9.426 9.426 ↓ 2.3 36,713 1

CTE Scan on filtered_products (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..9.426 rows=36,713 loops=1)

27. 46.289 92.405 ↓ 1.0 143,083 1

Hash (cost=5,107.78..5,107.78 rows=143,078 width=34) (actual time=92.405..92.405 rows=143,083 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 11322kB
28. 46.116 46.116 ↓ 1.0 143,084 1

Seq Scan on stocks (cost=0.00..5,107.78 rows=143,078 width=34) (actual time=0.009..46.116 rows=143,084 loops=1)

29. 0.044 25.671 ↑ 1.4 142 1

Subquery Scan on *SELECT* 10 (cost=689.70..694.70 rows=200 width=72) (actual time=25.552..25.671 rows=142 loops=1)

30. 1.736 25.627 ↑ 1.4 142 1

HashAggregate (cost=689.70..692.70 rows=200 width=88) (actual time=25.551..25.627 rows=142 loops=1)

  • Group Key: filtered_products_1."brandId
31. 7.803 23.891 ↓ 3.6 5,885 1

HashAggregate (cost=649.10..665.34 rows=1,624 width=48) (actual time=22.564..23.891 rows=5,885 loops=1)

  • Group Key: filtered_products_1."brandId", filtered_products_1.__group
32. 8.782 16.088 ↑ 1.1 14,125 1

Hash Join (cost=38.41..567.90 rows=16,241 width=48) (actual time=0.225..16.088 rows=14,125 loops=1)

  • Hash Cond: (filtered_products_1."brandId" = brands._id)
33. 7.095 7.095 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_1 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..7.095 rows=36,713 loops=1)

34. 0.110 0.211 ↑ 1.0 374 1

Hash (cost=33.74..33.74 rows=374 width=16) (actual time=0.211..0.211 rows=374 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
35. 0.101 0.101 ↑ 1.0 374 1

Seq Scan on brands (cost=0.00..33.74 rows=374 width=16) (actual time=0.011..0.101 rows=374 loops=1)

36. 0.003 33.559 ↑ 50.0 4 1

Subquery Scan on *SELECT* 11 (cost=446.62..451.62 rows=200 width=72) (actual time=33.555..33.559 rows=4 loops=1)

37. 4.199 33.556 ↑ 50.0 4 1

HashAggregate (cost=446.62..449.62 rows=200 width=76) (actual time=33.554..33.556 rows=4 loops=1)

  • Group Key: filtered_products_2.gender
38. 21.539 29.357 ↓ 10.0 16,218 1

HashAggregate (cost=406.02..422.26 rows=1,624 width=36) (actual time=25.448..29.357 rows=16,218 loops=1)

  • Group Key: filtered_products_2.gender, filtered_products_2.__group
39. 7.818 7.818 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_2 (cost=0.00..324.82 rows=16,241 width=36) (actual time=0.001..7.818 rows=36,713 loops=1)

40. 0.004 34.401 ↑ 15.4 13 1

Subquery Scan on *SELECT* 12 (cost=446.62..451.62 rows=200 width=72) (actual time=34.393..34.401 rows=13 loops=1)

41. 4.334 34.397 ↑ 15.4 13 1

HashAggregate (cost=446.62..449.62 rows=200 width=88) (actual time=34.392..34.397 rows=13 loops=1)

  • Group Key: filtered_products_3."supplierId
42. 22.546 30.063 ↓ 10.0 16,211 1

HashAggregate (cost=406.02..422.26 rows=1,624 width=48) (actual time=26.328..30.063 rows=16,211 loops=1)

  • Group Key: filtered_products_3."supplierId", filtered_products_3.__group
43. 7.517 7.517 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_3 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..7.517 rows=36,713 loops=1)

44. 0.006 126.745 ↑ 12.5 16 1

Subquery Scan on *SELECT* 13 (cost=5,404.76..5,409.76 rows=200 width=72) (actual time=126.732..126.745 rows=16 loops=1)

45. 7.193 126.739 ↑ 12.5 16 1

HashAggregate (cost=5,404.76..5,407.76 rows=200 width=88) (actual time=126.731..126.739 rows=16 loops=1)

  • Group Key: product_colors."colorId
46. 25.088 119.546 ↓ 8.9 28,474 1

HashAggregate (cost=5,324.76..5,356.76 rows=3,200 width=48) (actual time=112.090..119.546 rows=28,474 loops=1)

  • Group Key: product_colors."colorId", filtered_products_4.__group
47. 11.991 94.458 ↓ 1.6 34,016 1

Hash Join (cost=3,597.54..5,215.72 rows=21,808 width=48) (actual time=54.219..94.458 rows=34,016 loops=1)

  • Hash Cond: (product_colors."colorId" = colors._id)
48. 20.263 82.442 ↓ 1.6 34,016 1

Hash Join (cost=3,596.18..4,951.13 rows=21,808 width=48) (actual time=54.182..82.442 rows=34,016 loops=1)

  • Hash Cond: (filtered_products_4._id = product_colors."productId")
49. 8.325 8.325 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_4 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..8.325 rows=36,713 loops=1)

50. 30.391 53.854 ↑ 1.0 112,471 1

Hash (cost=2,184.97..2,184.97 rows=112,897 width=32) (actual time=53.854..53.854 rows=112,471 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 8054kB
51. 23.463 23.463 ↑ 1.0 112,471 1

Seq Scan on product_colors (cost=0.00..2,184.97 rows=112,897 width=32) (actual time=0.006..23.463 rows=112,471 loops=1)

52. 0.008 0.025 ↑ 1.0 16 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
53. 0.017 0.017 ↑ 1.0 16 1

Seq Scan on colors (cost=0.00..1.16 rows=16 width=16) (actual time=0.012..0.017 rows=16 loops=1)

  • Filter: visible
54. 0.128 20,792.915 ↓ 2.2 446 1

Subquery Scan on *SELECT* 14 (cost=256,478.18..256,483.18 rows=200 width=72) (actual time=20,792.608..20,792.915 rows=446 loops=1)

55. 11.637 20,792.787 ↓ 2.2 446 1

HashAggregate (cost=256,478.18..256,481.18 rows=200 width=88) (actual time=20,792.607..20,792.787 rows=446 loops=1)

  • Group Key: categories._id
56. 73.819 20,781.150 ↑ 2.7 37,283 1

HashAggregate (cost=254,008.18..254,996.18 rows=98,800 width=48) (actual time=20,769.591..20,781.150 rows=37,283 loops=1)

  • Group Key: categories._id, filtered_products_5.__group
57. 6,984.183 20,707.331 ↑ 4.4 95,890 1

Merge Left Join (cost=5,323.22..251,906.98 rows=420,240 width=48) (actual time=80.071..20,707.331 rows=95,890 loops=1)

  • Merge Cond: (categories._id = "additionalSubCategories"."parentCategoryId")
  • Filter: ((product_categories."categoryId" = categories._id) OR (product_categories."categoryId" = "subCategories"._id) OR (product_categories."categoryId" = "additionalSubCategories"."childCategoryId") OR (product_categories."categoryId" = "_subCategories"._id))
  • Rows Removed by Filter: 33464354
58. 8,850.434 13,376.596 ↓ 2.3 32,370,516 1

Nested Loop (cost=5,323.09..181,072.09 rows=13,897,975 width=80) (actual time=79.118..13,376.596 rows=32,370,516 loops=1)

59. 0.807 2.178 ↓ 1.3 653 1

Merge Left Join (cost=234.08..239.25 rows=494 width=32) (actual time=0.758..2.178 rows=653 loops=1)

  • Merge Cond: (categories._id = "subCategories"."parentCategoryId")
60. 0.618 0.837 ↑ 1.0 494 1

Sort (cost=117.04..118.28 rows=494 width=16) (actual time=0.396..0.837 rows=494 loops=1)

  • Sort Key: categories._id
  • Sort Method: quicksort Memory: 48kB
61. 0.219 0.219 ↑ 1.0 494 1

Seq Scan on categories (cost=0.00..94.94 rows=494 width=16) (actual time=0.012..0.219 rows=494 loops=1)

62. 0.318 0.534 ↑ 2.7 181 1

Sort (cost=117.04..118.28 rows=494 width=32) (actual time=0.360..0.534 rows=181 loops=1)

  • Sort Key: "subCategories"."parentCategoryId
  • Sort Method: quicksort Memory: 53kB
63. 0.216 0.216 ↑ 1.0 494 1

Seq Scan on categories "subCategories" (cost=0.00..94.94 rows=494 width=32) (actual time=0.003..0.216 rows=494 loops=1)

64. 4,410.775 4,523.984 ↓ 1.8 49,572 653

Materialize (cost=5,089.01..7,175.72 rows=28,134 width=48) (actual time=0.120..6.928 rows=49,572 loops=653)

65. 26.175 113.209 ↓ 1.8 49,572 1

Hash Join (cost=5,089.01..7,035.05 rows=28,134 width=48) (actual time=78.354..113.209 rows=49,572 loops=1)

  • Hash Cond: (filtered_products_5._id = product_categories."productId")
66. 9.476 9.476 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_5 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..9.476 rows=36,713 loops=1)

67. 44.592 77.558 ↑ 1.0 159,437 1

Hash (cost=3,091.78..3,091.78 rows=159,778 width=32) (actual time=77.558..77.558 rows=159,437 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 12013kB
68. 32.966 32.966 ↑ 1.0 159,437 1

Seq Scan on product_categories (cost=0.00..3,091.78 rows=159,778 width=32) (actual time=0.007..32.966 rows=159,437 loops=1)

69. 343.958 346.552 ↓ 47,628.0 2,429,029 1

Materialize (cost=0.14..219.81 rows=51 width=48) (actual time=0.577..346.552 rows=2,429,029 loops=1)

70. 1.165 2.594 ↑ 3.4 15 1

Nested Loop Left Join (cost=0.14..219.69 rows=51 width=48) (actual time=0.570..2.594 rows=15 loops=1)

  • Join Filter: ("_subCategories"."parentCategoryId" = "additionalSubCategories"."childCategoryId")
  • Rows Removed by Join Filter: 7410
71. 0.079 0.079 ↑ 1.0 15 1

Index Only Scan using additional_child_categories_uniq_key on additional_child_categories "additionalSubCategories" (cost=0.14..12.36 rows=15 width=32) (actual time=0.013..0.079 rows=15 loops=1)

  • Heap Fetches: 15
72. 1.042 1.350 ↑ 1.0 494 15

Materialize (cost=0.00..97.41 rows=494 width=32) (actual time=0.001..0.090 rows=494 loops=15)

73. 0.308 0.308 ↑ 1.0 494 1

Seq Scan on categories "_subCategories" (cost=0.00..94.94 rows=494 width=32) (actual time=0.007..0.308 rows=494 loops=1)

74. 0.014 74.181 ↑ 4.1 49 1

Subquery Scan on *SELECT* 15 (cost=3,898.97..3,903.97 rows=200 width=72) (actual time=74.147..74.181 rows=49 loops=1)

75. 1.921 74.167 ↑ 4.1 49 1

HashAggregate (cost=3,898.97..3,901.97 rows=200 width=88) (actual time=74.145..74.167 rows=49 loops=1)

  • Group Key: materials._id
76. 9.026 72.246 ↑ 2.6 7,021 1

HashAggregate (cost=3,433.97..3,619.97 rows=18,600 width=48) (actual time=70.573..72.246 rows=7,021 loops=1)

  • Group Key: materials._id, filtered_products_6.__group
77. 6.017 63.220 ↑ 1.3 16,218 1

Hash Join (cost=2,289.99..3,331.25 rows=20,544 width=48) (actual time=34.936..63.220 rows=16,218 loops=1)

  • Hash Cond: (product_materials."materialId" = materials._id)
78. 14.925 57.146 ↑ 1.2 17,900 1

Hash Join (cost=2,278.88..3,057.16 rows=20,985 width=48) (actual time=34.861..57.146 rows=17,900 loops=1)

  • Hash Cond: (filtered_products_6._id = product_materials."productId")
79. 7.800 7.800 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_6 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..7.800 rows=36,713 loops=1)

80. 19.602 34.421 ↑ 1.0 71,546 1

Hash (cost=1,384.50..1,384.50 rows=71,550 width=32) (actual time=34.421..34.421 rows=71,546 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 5496kB
81. 14.819 14.819 ↑ 1.0 71,546 1

Seq Scan on product_materials (cost=0.00..1,384.50 rows=71,550 width=32) (actual time=0.006..14.819 rows=71,546 loops=1)

82. 0.016 0.057 ↑ 1.8 52 1

Hash (cost=9.95..9.95 rows=93 width=16) (actual time=0.057..0.057 rows=52 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
83. 0.041 0.041 ↑ 1.8 52 1

Seq Scan on materials (cost=0.00..9.95 rows=93 width=16) (actual time=0.014..0.041 rows=52 loops=1)

  • Filter: visible
  • Rows Removed by Filter: 1
84. 0.003 12.145 ↑ 40.0 5 1

Subquery Scan on *SELECT* 16 (cost=549.82..554.82 rows=200 width=72) (actual time=12.140..12.145 rows=5 loops=1)

85. 0.115 12.142 ↑ 40.0 5 1

HashAggregate (cost=549.82..552.82 rows=200 width=88) (actual time=12.139..12.142 rows=5 loops=1)

  • Group Key: filtered_products_7."storageSizeId
86. 0.535 12.027 ↑ 1.6 413 1

HashAggregate (cost=533.57..540.07 rows=650 width=48) (actual time=11.941..12.027 rows=413 loops=1)

  • Group Key: filtered_products_7."storageSizeId", filtered_products_7.__group
87. 4.851 11.492 ↓ 1.7 1,083 1

Hash Join (cost=1.18..530.32 rows=650 width=48) (actual time=0.562..11.492 rows=1,083 loops=1)

  • Hash Cond: (filtered_products_7."storageSizeId" = storage_sizes._id)
88. 6.624 6.624 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_7 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..6.624 rows=36,713 loops=1)

89. 0.004 0.017 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=16) (actual time=0.017..0.017 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
90. 0.013 0.013 ↑ 1.0 8 1

Seq Scan on storage_sizes (cost=0.00..1.08 rows=8 width=16) (actual time=0.011..0.013 rows=8 loops=1)

  • Filter: visible
91. 0.005 57.163 ↑ 12.5 16 1

Subquery Scan on *SELECT* 17 (cost=2,068.00..2,073.00 rows=200 width=72) (actual time=57.151..57.163 rows=16 loops=1)

92. 1.050 57.158 ↑ 12.5 16 1

HashAggregate (cost=2,068.00..2,071.00 rows=200 width=88) (actual time=57.150..57.158 rows=16 loops=1)

  • Group Key: product_sizes."sizeId
93. 8.441 56.108 ↑ 2.4 3,912 1

HashAggregate (cost=1,834.70..1,928.02 rows=9,332 width=48) (actual time=55.201..56.108 rows=3,912 loops=1)

  • Group Key: product_sizes."sizeId", filtered_products_8.__group
94. 11.881 47.667 ↓ 2.0 18,366 1

Hash Join (cost=1,288.69..1,788.04 rows=9,332 width=48) (actual time=28.260..47.667 rows=18,366 loops=1)

  • Hash Cond: (filtered_products_8._id = product_sizes."productId")
95. 7.575 7.575 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_8 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..7.575 rows=36,713 loops=1)

96. 9.061 28.211 ↓ 6.1 32,476 1

Hash (cost=1,222.14..1,222.14 rows=5,324 width=32) (actual time=28.211..28.211 rows=32,476 loops=1)

  • Buckets: 32768 (originally 8192) Batches: 1 (originally 1) Memory Usage: 2286kB
97. 13.144 19.150 ↓ 6.1 32,476 1

Hash Join (cost=4.51..1,222.14 rows=5,324 width=32) (actual time=0.070..19.150 rows=32,476 loops=1)

  • Hash Cond: (product_sizes."sizeId" = sizes._id)
98. 5.956 5.956 ↑ 1.0 38,154 1

Seq Scan on product_sizes (cost=0.00..738.55 rows=38,155 width=32) (actual time=0.011..5.956 rows=38,154 loops=1)

99. 0.007 0.050 ↑ 1.0 18 1

Hash (cost=4.29..4.29 rows=18 width=16) (actual time=0.050..0.050 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
100. 0.043 0.043 ↑ 1.0 18 1

Seq Scan on sizes (cost=0.00..4.29 rows=18 width=16) (actual time=0.005..0.043 rows=18 loops=1)

  • Filter: "showInFilters
  • Rows Removed by Filter: 111
101. 0.004 123.582 ↑ 14.3 14 1

Subquery Scan on *SELECT* 18 (cost=4,645.94..4,650.94 rows=200 width=72) (actual time=123.572..123.582 rows=14 loops=1)

102. 4.301 123.578 ↑ 14.3 14 1

HashAggregate (cost=4,645.94..4,648.94 rows=200 width=88) (actual time=123.571..123.578 rows=14 loops=1)

  • Group Key: product_coatings."coatingId
103. 25.352 119.277 ↓ 5.2 15,711 1

HashAggregate (cost=4,570.94..4,600.94 rows=3,000 width=48) (actual time=115.602..119.277 rows=15,711 loops=1)

  • Group Key: product_coatings."coatingId", filtered_products_9.__group
104. 16.749 93.925 ↓ 1.4 48,144 1

Hash Join (cost=2,933.82..4,401.90 rows=33,809 width=48) (actual time=44.790..93.925 rows=48,144 loops=1)

  • Hash Cond: (product_coatings."coatingId" = coatings._id)
105. 24.604 77.156 ↓ 1.3 48,210 1

Hash Join (cost=2,931.49..3,963.68 rows=36,224 width=48) (actual time=44.755..77.156 rows=48,210 loops=1)

  • Hash Cond: (filtered_products_9._id = product_coatings."productId")
106. 8.197 8.197 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_9 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..8.197 rows=36,713 loops=1)

107. 25.121 44.355 ↓ 1.0 92,091 1

Hash (cost=1,781.22..1,781.22 rows=92,022 width=32) (actual time=44.355..44.355 rows=92,091 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 6780kB
108. 19.234 19.234 ↓ 1.0 92,091 1

Seq Scan on product_coatings (cost=0.00..1,781.22 rows=92,022 width=32) (actual time=0.006..19.234 rows=92,091 loops=1)

109. 0.005 0.020 ↑ 1.0 14 1

Hash (cost=2.15..2.15 rows=14 width=16) (actual time=0.020..0.020 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
110. 0.015 0.015 ↑ 1.0 14 1

Seq Scan on coatings (cost=0.00..2.15 rows=14 width=16) (actual time=0.010..0.015 rows=14 loops=1)

  • Filter: visible
  • Rows Removed by Filter: 1
111. 0.002 12.649 ↑ 40.0 5 1

Subquery Scan on *SELECT* 19 (cost=542.45..547.45 rows=200 width=72) (actual time=12.645..12.649 rows=5 loops=1)

112. 0.135 12.647 ↑ 40.0 5 1

HashAggregate (cost=542.45..545.45 rows=200 width=88) (actual time=12.644..12.647 rows=5 loops=1)

  • Group Key: filtered_products_10."clothDensityId
113. 0.813 12.512 ↑ 1.0 394 1

HashAggregate (cost=532.30..536.36 rows=406 width=48) (actual time=12.435..12.512 rows=394 loops=1)

  • Group Key: filtered_products_10."clothDensityId", filtered_products_10.__group
114. 5.166 11.699 ↓ 4.5 1,820 1

Hash Join (cost=1.12..530.27 rows=406 width=48) (actual time=0.169..11.699 rows=1,820 loops=1)

  • Hash Cond: (filtered_products_10."clothDensityId" = cloth_densities._id)
115. 6.511 6.511 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_10 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..6.511 rows=36,713 loops=1)

116. 0.003 0.022 ↑ 1.0 5 1

Hash (cost=1.06..1.06 rows=5 width=16) (actual time=0.022..0.022 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
117. 0.019 0.019 ↑ 1.0 5 1

Seq Scan on cloth_densities (cost=0.00..1.06 rows=5 width=16) (actual time=0.017..0.019 rows=5 loops=1)

  • Filter: visible
  • Rows Removed by Filter: 1
118. 0.003 12.069 ↑ 33.3 6 1

Subquery Scan on *SELECT* 20 (cost=544.90..549.90 rows=200 width=72) (actual time=12.064..12.069 rows=6 loops=1)

119. 0.100 12.066 ↑ 33.3 6 1

HashAggregate (cost=544.90..547.90 rows=200 width=88) (actual time=12.063..12.066 rows=6 loops=1)

  • Group Key: filtered_products_11."batteryVolumeId
120. 0.387 11.966 ↑ 1.4 341 1

HashAggregate (cost=532.72..537.59 rows=487 width=48) (actual time=11.892..11.966 rows=341 loops=1)

  • Group Key: filtered_products_11."batteryVolumeId", filtered_products_11.__group
121. 4.799 11.579 ↓ 1.3 648 1

Hash Join (cost=1.15..530.29 rows=487 width=48) (actual time=0.043..11.579 rows=648 loops=1)

  • Hash Cond: (filtered_products_11."batteryVolumeId" = battery_volumes._id)
122. 6.765 6.765 ↓ 2.3 36,713 1

CTE Scan on filtered_products filtered_products_11 (cost=0.00..324.82 rows=16,241 width=48) (actual time=0.001..6.765 rows=36,713 loops=1)

123. 0.005 0.015 ↑ 1.0 6 1

Hash (cost=1.07..1.07 rows=6 width=16) (actual time=0.015..0.015 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
124. 0.010 0.010 ↑ 1.0 6 1

Seq Scan on battery_volumes (cost=0.00..1.07 rows=6 width=16) (actual time=0.008..0.010 rows=6 loops=1)

  • Filter: visible
  • Rows Removed by Filter: 1
Planning time : 2.895 ms
Execution time : 21,630.947 ms