explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gQrU

Settings
# exclusive inclusive rows x rows loops node
1. 249.398 19,342.979 ↑ 16,022.4 32,479 1

Merge Right Join (cost=390,366.94..16,051,055.96 rows=520,390,014 width=1,467) (actual time=19,041.501..19,342.979 rows=32,479 loops=1)

  • Merge Cond: (fa.product_id = pp.product_id)
2.          

CTE product_popularity

3. 54.852 188.710 ↑ 1.0 20,229 1

GroupAggregate (cost=0.29..1,950.57 rows=20,229 width=12) (actual time=17.202..188.710 rows=20,229 loops=1)

  • Group Key: pp_1.product_id
4. 133.858 133.858 ↑ 1.0 29,878 1

Index Scan using product_popularity_pkey on product_popularity pp_1 (cost=0.29..1,548.32 rows=29,878 width=12) (actual time=0.058..133.858 rows=29,878 loops=1)

5.          

CTE products

6. 37.610 44.207 ↓ 1.0 32,479 1

Bitmap Heap Scan on product pp_2 (cost=597.88..10,347.95 rows=32,078 width=55) (actual time=8.741..44.207 rows=32,479 loops=1)

  • Recheck Cond: (product_status_id = ANY ('{4,5,6}'::integer[]))
  • Heap Blocks: exact=7763
7. 6.597 6.597 ↓ 1.0 32,479 1

Bitmap Index Scan on fki_product_product_status_id_fkey (cost=0.00..589.86 rows=32,078 width=0) (actual time=6.597..6.597 rows=32,479 loops=1)

  • Index Cond: (product_status_id = ANY ('{4,5,6}'::integer[]))
8.          

CTE products_activity

9. 279.332 428.907 ↓ 162.4 32,479 1

GroupAggregate (cost=10,839.43..12,680.77 rows=200 width=12) (actual time=140.026..428.907 rows=32,479 loops=1)

  • Group Key: pp_3.product_id
10. 32.894 149.575 ↓ 1.2 56,676 1

Sort (cost=10,839.43..10,961.95 rows=49,009 width=12) (actual time=139.895..149.575 rows=56,676 loops=1)

  • Sort Key: pp_3.product_id
  • Sort Method: quicksort Memory: 4193kB
11. 25.576 116.681 ↓ 1.2 56,676 1

Hash Left Join (cost=3,975.99..7,021.45 rows=49,009 width=12) (actual time=60.784..116.681 rows=56,676 loops=1)

  • Hash Cond: ((ps.shop_id = ppa.shop_id) AND (pp_3.product_id = ppa.product_id))
12. 19.844 65.396 ↓ 1.2 56,676 1

Hash Left Join (cost=2,199.88..3,973.09 rows=49,009 width=8) (actual time=34.798..65.396 rows=56,676 loops=1)

  • Hash Cond: (pp_3.product_id = ps.product_id)
13. 11.052 11.052 ↓ 1.0 32,479 1

CTE Scan on products pp_3 (cost=0.00..641.56 rows=32,078 width=4) (actual time=0.003..11.052 rows=32,479 loops=1)

14. 10.442 34.500 ↑ 1.0 46,189 1

Hash (cost=1,620.97..1,620.97 rows=46,312 width=8) (actual time=34.500..34.500 rows=46,189 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2317kB
15. 24.058 24.058 ↑ 1.0 46,189 1

Seq Scan on shipment ps (cost=0.00..1,620.97 rows=46,312 width=8) (actual time=0.047..24.058 rows=46,189 loops=1)

  • Filter: (amount > '0'::numeric)
  • Rows Removed by Filter: 22769
16. 10.859 25.709 ↑ 1.0 41,772 1

Hash (cost=1,146.23..1,146.23 rows=41,992 width=12) (actual time=25.709..25.709 rows=41,772 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2171kB
17. 14.850 14.850 ↑ 1.0 41,772 1

Seq Scan on product_activity ppa (cost=0.00..1,146.23 rows=41,992 width=12) (actual time=0.019..14.850 rows=41,772 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 15249
18.          

CTE prices

19. 314.079 493.736 ↓ 162.4 32,479 1

GroupAggregate (cost=15,987.01..23,865.66 rows=200 width=18) (actual time=108.363..493.736 rows=32,479 loops=1)

  • Group Key: pp_4.product_id
20. 44.564 179.657 ↑ 1.7 111,329 1

Merge Left Join (cost=15,987.01..19,040.81 rows=192,894 width=18) (actual time=108.265..179.657 rows=111,329 loops=1)

  • Merge Cond: (pp_4.product_id = p_price.product_id)
21. 17.804 23.970 ↓ 1.0 32,479 1

Sort (cost=3,042.49..3,122.68 rows=32,078 width=4) (actual time=18.609..23.970 rows=32,479 loops=1)

  • Sort Key: pp_4.product_id
  • Sort Method: quicksort Memory: 2291kB
22. 6.166 6.166 ↓ 1.0 32,479 1

CTE Scan on products pp_4 (cost=0.00..641.56 rows=32,078 width=4) (actual time=0.002..6.166 rows=32,479 loops=1)

23. 78.177 111.123 ↑ 1.0 123,068 1

Sort (cost=12,944.52..13,252.19 rows=123,068 width=18) (actual time=89.643..111.123 rows=123,068 loops=1)

  • Sort Key: p_price.product_id
  • Sort Method: quicksort Memory: 10837kB
24. 32.946 32.946 ↑ 1.0 123,068 1

Seq Scan on price p_price (cost=0.00..2,539.68 rows=123,068 width=18) (actual time=0.028..32.946 rows=123,068 loops=1)

25.          

CTE categories

26. 479.011 872.786 ↓ 162.4 32,478 1

GroupAggregate (cost=20,974.90..22,201.54 rows=200 width=556) (actual time=380.402..872.786 rows=32,478 loops=1)

  • Group Key: pp_5.product_id
27. 46.190 393.775 ↓ 1.3 56,028 1

Sort (cost=20,974.90..21,085.91 rows=44,405 width=556) (actual time=380.206..393.775 rows=56,028 loops=1)

  • Sort Key: pp_5.product_id
  • Sort Method: quicksort Memory: 6881kB
28. 14.282 347.585 ↓ 1.3 56,028 1

Hash Left Join (cost=13,910.60..17,547.18 rows=44,405 width=556) (actual time=221.065..347.585 rows=56,028 loops=1)

  • Hash Cond: (pptcs.category_site_id = pcss.category_site_id)
29. 22.321 333.281 ↓ 1.2 54,915 1

Hash Join (cost=13,909.20..17,363.24 rows=44,405 width=44) (actual time=221.020..333.281 rows=54,915 loops=1)

  • Hash Cond: (pptcs.category_site_id = ppcs.category_site_id)
30. 38.950 310.110 ↓ 1.2 59,500 1

Hash Join (cost=13,832.91..16,656.26 rows=49,770 width=9) (actual time=220.156..310.110 rows=59,500 loops=1)

  • Hash Cond: (pp_5.product_id = pptcs.product_id)
31. 65.326 65.326 ↓ 1.0 32,479 1

CTE Scan on products pp_5 (cost=0.00..641.56 rows=32,078 width=4) (actual time=8.745..65.326 rows=32,479 loops=1)

32. 110.333 205.834 ↑ 1.0 402,707 1

Hash (cost=8,799.07..8,799.07 rows=402,707 width=9) (actual time=205.834..205.834 rows=402,707 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 21400kB
33. 95.501 95.501 ↑ 1.0 402,707 1

Seq Scan on product_to_category_site pptcs (cost=0.00..8,799.07 rows=402,707 width=9) (actual time=0.011..95.501 rows=402,707 loops=1)

34. 0.192 0.850 ↑ 1.0 687 1

Hash (cost=67.70..67.70 rows=687 width=35) (actual time=0.850..0.850 rows=687 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
35. 0.658 0.658 ↑ 1.0 687 1

Seq Scan on category_site ppcs (cost=0.00..67.70 rows=687 width=35) (actual time=0.102..0.658 rows=687 loops=1)

  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 83
36. 0.011 0.022 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=520) (actual time=0.022..0.022 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
37. 0.011 0.011 ↑ 1.0 18 1

Seq Scan on category_site_synonyms pcss (cost=0.00..1.18 rows=18 width=520) (actual time=0.009..0.011 rows=18 loops=1)

38.          

CTE product_synonyms

39. 89.230 124.128 ↓ 162.4 32,479 1

GroupAggregate (cost=3,043.79..3,393.53 rows=200 width=520) (actual time=19.560..124.128 rows=32,479 loops=1)

  • Group Key: pp_6.product_id
40. 10.255 34.898 ↓ 1.0 32,479 1

Merge Left Join (cost=3,043.79..3,230.64 rows=32,078 width=520) (actual time=19.531..34.898 rows=32,479 loops=1)

  • Merge Cond: (pp_6.product_id = pps.product_id)
41. 17.625 24.539 ↓ 1.0 32,479 1

Sort (cost=3,042.49..3,122.68 rows=32,078 width=4) (actual time=19.422..24.539 rows=32,479 loops=1)

  • Sort Key: pp_6.product_id
  • Sort Method: quicksort Memory: 2291kB
42. 6.914 6.914 ↓ 1.0 32,479 1

CTE Scan on products pp_6 (cost=0.00..641.56 rows=32,078 width=4) (actual time=0.007..6.914 rows=32,479 loops=1)

43. 0.020 0.104 ↑ 1.0 11 1

Sort (cost=1.30..1.33 rows=11 width=520) (actual time=0.100..0.104 rows=11 loops=1)

  • Sort Key: pps.product_id
  • Sort Method: quicksort Memory: 25kB
44. 0.084 0.084 ↑ 1.0 11 1

Seq Scan on product_synonyms pps (cost=0.00..1.11 rows=11 width=520) (actual time=0.082..0.084 rows=11 loops=1)

45.          

CTE properties

46. 410.894 2,027.201 ↓ 162.4 32,479 1

GroupAggregate (cost=111,000.58..115,300.77 rows=200 width=181) (actual time=1,518.727..2,027.201 rows=32,479 loops=1)

  • Group Key: pp_7.product_id
47. 388.219 1,616.307 ↓ 1.7 711,592 1

Sort (cost=111,000.58..112,074.75 rows=429,669 width=181) (actual time=1,518.563..1,616.307 rows=711,592 loops=1)

  • Sort Key: pp_7.product_id
  • Sort Method: quicksort Memory: 59558kB
48. 212.409 1,228.088 ↓ 1.7 711,592 1

Hash Left Join (cost=45,354.52..70,798.89 rows=429,669 width=181) (actual time=606.916..1,228.088 rows=711,592 loops=1)

  • Hash Cond: ((pptv_type.value_id = pv_type.value_id) AND (ppitop.property_id = pv_type.property_id))
49. 146.800 956.757 ↓ 1.7 710,423 1

Hash Left Join (cost=40,876.84..63,092.43 rows=429,669 width=12) (actual time=547.679..956.757 rows=710,423 loops=1)

  • Hash Cond: (pptv_type.property_id = ppitop.property_id)
50. 277.902 809.889 ↓ 1.6 708,570 1

Hash Left Join (cost=40,872.53..59,203.35 rows=429,669 width=12) (actual time=547.567..809.889 rows=708,570 loops=1)

  • Hash Cond: (pp_7.product_id = pptv_type.product_id)
51. 10.518 10.518 ↓ 1.0 32,479 1

CTE Scan on products pp_7 (cost=0.00..641.56 rows=32,078 width=4) (actual time=0.002..10.518 rows=32,479 loops=1)

52. 278.455 521.469 ↑ 1.0 1,245,757 1

Hash (cost=25,300.57..25,300.57 rows=1,245,757 width=12) (actual time=521.469..521.469 rows=1,245,757 loops=1)

  • Buckets: 2097152 Batches: 1 Memory Usage: 69913kB
53. 243.014 243.014 ↑ 1.0 1,245,757 1

Seq Scan on product_to_value pptv_type (cost=0.00..25,300.57 rows=1,245,757 width=12) (actual time=0.021..243.014 rows=1,245,757 loops=1)

54. 0.035 0.068 ↑ 1.0 147 1

Hash (cost=2.47..2.47 rows=147 width=4) (actual time=0.068..0.068 rows=147 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
55. 0.033 0.033 ↑ 1.0 147 1

Seq Scan on property_is_type_of_product ppitop (cost=0.00..2.47 rows=147 width=4) (actual time=0.013..0.033 rows=147 loops=1)

56. 26.967 58.922 ↓ 1.0 58,634 1

Hash (cost=3,598.75..3,598.75 rows=58,595 width=185) (actual time=58.922..58.922 rows=58,634 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 12272kB
57. 19.052 31.955 ↓ 1.0 58,634 1

Hash Left Join (cost=4.83..3,598.75 rows=58,595 width=185) (actual time=0.116..31.955 rows=58,634 loops=1)

  • Hash Cond: (pv_type.value_id = pvs_type.value_id)
58. 12.823 12.823 ↑ 1.0 58,595 1

Seq Scan on value pv_type (cost=0.00..3,079.95 rows=58,595 width=171) (actual time=0.008..12.823 rows=58,595 loops=1)

59. 0.044 0.080 ↑ 1.0 126 1

Hash (cost=3.26..3.26 rows=126 width=18) (actual time=0.080..0.080 rows=126 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
60. 0.036 0.036 ↑ 1.0 126 1

Seq Scan on value_synonyms pvs_type (cost=0.00..3.26 rows=126 width=18) (actual time=0.011..0.036 rows=126 loops=1)

61.          

CTE p

62. 2,918.070 8,260.923 ↓ 162.4 32,479 1

GroupAggregate (cost=105,300.99..130,015.46 rows=200 width=284) (actual time=5,130.388..8,260.923 rows=32,479 loops=1)

  • Group Key: pp_8.product_id
63. 753.929 5,342.853 ↓ 1.7 710,646 1

Sort (cost=105,300.99..106,375.16 rows=429,669 width=284) (actual time=5,129.958..5,342.853 rows=710,646 loops=1)

  • Sort Key: pp_8.product_id
  • Sort Method: quicksort Memory: 123092kB
64. 456.798 4,588.924 ↓ 1.7 710,646 1

Hash Left Join (cost=4,337.97..65,099.30 rows=429,669 width=284) (actual time=59.433..4,588.924 rows=710,646 loops=1)

  • Hash Cond: (pptv.value_id = pv.value_id)
65. 187.889 4,073.300 ↓ 1.6 708,570 1

Nested Loop Left Join (cost=6.78..54,860.16 rows=429,669 width=103) (actual time=0.318..4,073.300 rows=708,570 loops=1)

66. 20.410 20.410 ↓ 1.0 32,479 1

CTE Scan on products pp_8 (cost=0.00..641.56 rows=32,078 width=4) (actual time=0.001..20.410 rows=32,479 loops=1)

67. 584.637 3,865.001 ↓ 1.7 22 32,479

Hash Right Join (cost=6.78..8.34 rows=13 width=103) (actual time=0.103..0.119 rows=22 loops=32,479)

  • Hash Cond: (pm.measure_id = ppr.measure_id)
68. 162.380 162.380 ↑ 1.0 36 32,476

Seq Scan on measure pm (cost=0.00..1.36 rows=36 width=68) (actual time=0.002..0.005 rows=36 loops=32,476)

69. 259.832 3,117.984 ↓ 1.7 22 32,479

Hash (cost=6.62..6.62 rows=13 width=43) (actual time=0.096..0.096 rows=22 loops=32,479)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
70. 596.564 2,858.152 ↓ 1.7 22 32,479

Nested Loop Left Join (cost=0.70..6.62 rows=13 width=43) (actual time=0.016..0.088 rows=22 loops=32,479)

71. 844.454 844.454 ↓ 1.7 22 32,479

Index Scan using fki_product_to_value_product_id_fkey on product_to_value pptv (cost=0.43..2.68 rows=13 width=12) (actual time=0.012..0.026 rows=22 loops=32,479)

  • Index Cond: (pp_8.product_id = product_id)
72. 1,417.134 1,417.134 ↑ 1.0 1 708,567

Index Scan using property_pkey on property ppr (cost=0.28..0.29 rows=1 width=39) (actual time=0.002..0.002 rows=1 loops=708,567)

  • Index Cond: (pptv.property_id = property_id)
73. 25.914 58.826 ↓ 1.0 58,634 1

Hash (cost=3,598.75..3,598.75 rows=58,595 width=185) (actual time=58.826..58.826 rows=58,634 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 12272kB
74. 19.121 32.912 ↓ 1.0 58,634 1

Hash Left Join (cost=4.83..3,598.75 rows=58,595 width=185) (actual time=0.089..32.912 rows=58,634 loops=1)

  • Hash Cond: (pv.value_id = pvs.value_id)
75. 13.720 13.720 ↑ 1.0 58,595 1

Seq Scan on value pv (cost=0.00..3,079.95 rows=58,595 width=171) (actual time=0.007..13.720 rows=58,595 loops=1)

76. 0.029 0.071 ↑ 1.0 126 1

Hash (cost=3.26..3.26 rows=126 width=18) (actual time=0.071..0.071 rows=126 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
77. 0.042 0.042 ↑ 1.0 126 1

Seq Scan on value_synonyms pvs (cost=0.00..3.26 rows=126 width=18) (actual time=0.010..0.042 rows=126 loops=1)

78.          

CTE final_aggregation

79. 5,061.127 18,186.869 ↓ 1.0 32,478 1

Merge Left Join (cost=3,112.35..16,746.50 rows=32,078 width=496) (actual time=12,811.721..18,186.869 rows=32,478 loops=1)

  • Merge Cond: (pp_9.product_id = properties.product_id)
80. 23.463 11,040.332 ↓ 1.0 32,478 1

Merge Left Join (cost=3,100.70..5,828.33 rows=32,078 width=468) (actual time=10,735.431..11,040.332 rows=32,478 loops=1)

  • Merge Cond: (pp_9.product_id = pa.product_id)
81. 50.493 10,521.028 ↓ 1.0 32,478 1

Merge Left Join (cost=3,089.06..5,255.33 rows=32,078 width=372) (actual time=10,250.755..10,521.028 rows=32,478 loops=1)

  • Merge Cond: (pp_9.product_id = p.product_id)
82. 20.860 1,842.758 ↓ 1.0 32,478 1

Merge Left Join (cost=3,077.42..4,682.32 rows=32,078 width=264) (actual time=1,682.441..1,842.758 rows=32,478 loops=1)

  • Merge Cond: (pp_9.product_id = prices.product_id)
83. 20.149 1,253.490 ↓ 1.0 32,478 1

Merge Left Join (cost=3,065.77..4,109.31 rows=32,078 width=232) (actual time=1,135.856..1,253.490 rows=32,478 loops=1)

  • Merge Cond: (pp_9.product_id = ps_1.product_id)
84. 30.078 1,062.985 ↓ 1.0 32,478 1

Merge Join (cost=3,054.13..3,536.30 rows=32,078 width=200) (actual time=981.314..1,062.985 rows=32,478 loops=1)

  • Merge Cond: (c.product_id = pp_9.product_id)
85. 57.330 982.358 ↓ 162.4 32,478 1

Sort (cost=11.64..12.14 rows=200 width=168) (actual time=953.467..982.358 rows=32,478 loops=1)

  • Sort Key: c.product_id
  • Sort Method: quicksort Memory: 10366kB
86. 925.028 925.028 ↓ 162.4 32,478 1

CTE Scan on categories c (cost=0.00..4.00 rows=200 width=168) (actual time=380.405..925.028 rows=32,478 loops=1)

87. 43.808 50.549 ↓ 1.0 32,479 1

Sort (cost=3,042.49..3,122.68 rows=32,078 width=36) (actual time=27.838..50.549 rows=32,479 loops=1)

  • Sort Key: pp_9.product_id
  • Sort Method: quicksort Memory: 5426kB
88. 6.741 6.741 ↓ 1.0 32,479 1

CTE Scan on products pp_9 (cost=0.00..641.56 rows=32,078 width=36) (actual time=0.002..6.741 rows=32,479 loops=1)

89. 26.610 170.356 ↓ 162.4 32,479 1

Sort (cost=11.64..12.14 rows=200 width=36) (actual time=154.536..170.356 rows=32,479 loops=1)

  • Sort Key: ps_1.product_id
  • Sort Method: quicksort Memory: 3306kB
90. 143.746 143.746 ↓ 162.4 32,479 1

CTE Scan on product_synonyms ps_1 (cost=0.00..4.00 rows=200 width=36) (actual time=19.566..143.746 rows=32,479 loops=1)

91. 39.732 568.408 ↓ 162.4 32,479 1

Sort (cost=11.64..12.14 rows=200 width=36) (actual time=546.579..568.408 rows=32,479 loops=1)

  • Sort Key: prices.product_id
  • Sort Method: quicksort Memory: 5782kB
92. 528.676 528.676 ↓ 162.4 32,479 1

CTE Scan on prices (cost=0.00..4.00 rows=200 width=36) (actual time=108.369..528.676 rows=32,479 loops=1)

93. 196.422 8,627.777 ↓ 162.4 32,479 1

Sort (cost=11.64..12.14 rows=200 width=108) (actual time=8,568.294..8,627.777 rows=32,479 loops=1)

  • Sort Key: p.product_id
  • Sort Method: quicksort Memory: 78399kB
94. 8,431.355 8,431.355 ↓ 162.4 32,479 1

CTE Scan on p (cost=0.00..4.00 rows=200 width=108) (actual time=5,130.398..8,431.355 rows=32,479 loops=1)

95. 30.701 495.841 ↓ 162.4 32,479 1

Sort (cost=11.64..12.14 rows=200 width=100) (actual time=484.653..495.841 rows=32,479 loops=1)

  • Sort Key: pa.product_id
  • Sort Method: quicksort Memory: 6639kB
96. 465.140 465.140 ↓ 162.4 32,479 1

CTE Scan on products_activity pa (cost=0.00..4.00 rows=200 width=100) (actual time=140.038..465.140 rows=32,479 loops=1)

97. 27.233 2,085.410 ↓ 162.4 32,479 1

Sort (cost=11.64..12.14 rows=200 width=36) (actual time=2,072.841..2,085.410 rows=32,479 loops=1)

  • Sort Key: properties.product_id
  • Sort Method: quicksort Memory: 5522kB
98. 2,058.177 2,058.177 ↓ 162.4 32,479 1

CTE Scan on properties (cost=0.00..4.00 rows=200 width=36) (actual time=1,518.734..2,058.177 rows=32,479 loops=1)

99. 97.716 18,507.812 ↓ 1.0 32,478 1

Sort (cost=3,042.49..3,122.68 rows=32,078 width=324) (actual time=18,496.395..18,507.812 rows=32,478 loops=1)

  • Sort Key: fa.product_id
  • Sort Method: quicksort Memory: 34521kB
100. 18,410.096 18,410.096 ↓ 1.0 32,478 1

CTE Scan on final_aggregation fa (cost=0.00..641.56 rows=32,078 width=324) (actual time=12,811.743..18,410.096 rows=32,478 loops=1)

101. 10.928 585.769 ↑ 99.9 32,479 1

Materialize (cost=50,821.72..107,761.36 rows=3,244,529 width=1,147) (actual time=544.848..585.769 rows=32,479 loops=1)

102. 17.913 574.841 ↑ 99.9 32,479 1

Merge Left Join (cost=50,821.72..99,650.04 rows=3,244,529 width=1,147) (actual time=544.842..574.841 rows=32,479 loops=1)

  • Merge Cond: (pp.product_id = product_popularity.product_id)
103. 39.550 341.597 ↓ 1.0 32,479 1

Sort (cost=48,970.35..49,050.54 rows=32,078 width=1,115) (actual time=332.919..341.597 rows=32,479 loops=1)

  • Sort Key: pp.product_id
  • Sort Method: quicksort Memory: 17229kB
104. 63.462 302.047 ↓ 1.0 32,479 1

Merge Right Join (cost=3,042.91..46,569.42 rows=32,078 width=1,115) (actual time=21.293..302.047 rows=32,479 loops=1)

  • Merge Cond: (ppi.product_id = pp.product_id)
105. 210.575 210.575 ↑ 1.0 375,518 1

Index Scan using product_info_pkey on product_info ppi (cost=0.42..42,105.67 rows=376,038 width=1,114) (actual time=0.062..210.575 rows=375,518 loops=1)

106. 19.443 28.010 ↓ 1.0 32,479 1

Sort (cost=3,042.49..3,122.68 rows=32,078 width=5) (actual time=21.175..28.010 rows=32,479 loops=1)

  • Sort Key: pp.product_id
  • Sort Method: quicksort Memory: 2291kB
107. 8.567 8.567 ↓ 1.0 32,479 1

CTE Scan on products pp (cost=0.00..641.56 rows=32,078 width=5) (actual time=0.011..8.567 rows=32,479 loops=1)

108. 12.458 215.331 ↑ 1.0 20,229 1

Sort (cost=1,851.37..1,901.94 rows=20,229 width=36) (actual time=211.889..215.331 rows=20,229 loops=1)

  • Sort Key: product_popularity.product_id
  • Sort Method: quicksort Memory: 2185kB
109. 202.873 202.873 ↑ 1.0 20,229 1

CTE Scan on product_popularity (cost=0.00..404.58 rows=20,229 width=36) (actual time=17.224..202.873 rows=20,229 loops=1)