explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IHU5

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 1,718.228 ↓ 3.6 50 1

Limit (cost=44,521.04..44,521.07 rows=14 width=8,268) (actual time=1,718.180..1,718.228 rows=50 loops=1)

2.          

CTE lb_parts

3. 66.939 218.670 ↑ 14.1 4,402 1

GroupAggregate (cost=22,627.57..25,582.12 rows=62,201 width=220) (actual time=135.003..218.670 rows=4,402 loops=1)

  • Group Key: locations_buildings.building_id, locations_1.id
4. 76.942 151.731 ↑ 1.1 57,494 1

Sort (cost=22,627.57..22,783.07 rows=62,201 width=472) (actual time=134.955..151.731 rows=57,494 loops=1)

  • Sort Key: locations_buildings.building_id, locations_1.id
  • Sort Method: external merge Disk: 15056kB
5. 11.422 74.789 ↑ 1.1 57,494 1

Hash Left Join (cost=1,906.38..4,490.42 rows=62,201 width=472) (actual time=19.233..74.789 rows=57,494 loops=1)

  • Hash Cond: (locations_buildings.location_id = locations_3.id)
6. 11.274 63.282 ↑ 1.1 57,494 1

Hash Left Join (cost=1,876.44..4,296.18 rows=62,201 width=360) (actual time=19.142..63.282 rows=57,494 loops=1)

  • Hash Cond: (locations_buildings.location_id = locations_2.id)
7. 13.853 51.928 ↑ 1.1 57,494 1

Hash Left Join (cost=1,846.73..4,102.17 rows=62,201 width=244) (actual time=19.038..51.928 rows=57,494 loops=1)

  • Hash Cond: (locations_buildings.location_id = locations.id)
8. 12.269 37.798 ↑ 1.1 57,494 1

Hash Right Join (cost=1,809.78..3,900.92 rows=62,201 width=128) (actual time=18.741..37.798 rows=57,494 loops=1)

  • Hash Cond: (locations_buildings_1.building_id = locations_buildings.building_id)
9. 1.355 7.422 ↓ 1.0 4,398 1

Hash Left Join (cost=36.17..1,102.45 rows=4,297 width=124) (actual time=0.344..7.422 rows=4,398 loops=1)

  • Hash Cond: (locations_buildings_1.location_id = locations_1.id)
10. 5.751 5.751 ↓ 1.0 4,398 1

Seq Scan on locations_buildings locations_buildings_1 (cost=0.00..1,054.94 rows=4,297 width=8) (actual time=0.010..5.751 rows=4,398 loops=1)

  • Filter: main_subway
  • Rows Removed by Filter: 53096
11. 0.166 0.316 ↑ 1.0 674 1

Hash (cost=27.74..27.74 rows=674 width=120) (actual time=0.316..0.316 rows=674 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 110kB
12. 0.150 0.150 ↑ 1.0 674 1

Seq Scan on locations locations_1 (cost=0.00..27.74 rows=674 width=120) (actual time=0.006..0.150 rows=674 loops=1)

13. 9.666 18.107 ↑ 1.0 57,494 1

Hash (cost=1,054.94..1,054.94 rows=57,494 width=8) (actual time=18.107..18.107 rows=57,494 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2758kB
14. 8.441 8.441 ↑ 1.0 57,494 1

Seq Scan on locations_buildings (cost=0.00..1,054.94 rows=57,494 width=8) (actual time=0.016..8.441 rows=57,494 loops=1)

15. 0.146 0.277 ↑ 1.0 602 1

Hash (cost=29.43..29.43 rows=602 width=120) (actual time=0.277..0.277 rows=602 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 99kB
16. 0.131 0.131 ↑ 1.0 602 1

Seq Scan on locations (cost=0.00..29.43 rows=602 width=120) (actual time=0.004..0.131 rows=602 loops=1)

  • Filter: (category = 1)
  • Rows Removed by Filter: 72
17. 0.012 0.080 ↑ 1.0 23 1

Hash (cost=29.43..29.43 rows=23 width=120) (actual time=0.079..0.080 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
18. 0.068 0.068 ↑ 1.0 23 1

Seq Scan on locations locations_2 (cost=0.00..29.43 rows=23 width=120) (actual time=0.004..0.068 rows=23 loops=1)

  • Filter: (category = 3)
  • Rows Removed by Filter: 651
19. 0.015 0.085 ↑ 1.0 41 1

Hash (cost=29.43..29.43 rows=41 width=120) (actual time=0.085..0.085 rows=41 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
20. 0.070 0.070 ↑ 1.0 41 1

Seq Scan on locations locations_3 (cost=0.00..29.43 rows=41 width=120) (actual time=0.005..0.070 rows=41 loops=1)

  • Filter: (category = 0)
  • Rows Removed by Filter: 633
21.          

CTE p_parts_t

22. 21.210 21.210 ↑ 1.0 9,316 1

Seq Scan on products products_2 (cost=0.00..1,517.24 rows=9,328 width=40) (actual time=0.035..21.210 rows=9,316 loops=1)

23.          

CTE p_a_parts

24. 7.084 48.737 ↑ 1.0 9,316 1

Hash Left Join (cost=1,936.17..2,755.41 rows=9,435 width=72) (actual time=11.238..48.737 rows=9,316 loops=1)

  • Hash Cond: (p_parts_t.p_parts_t__p_id = amounts_maps_5.product_id)
25. 4.627 36.318 ↑ 1.0 9,316 1

Hash Left Join (cost=966.25..1,302.62 rows=9,328 width=46) (actual time=5.812..36.318 rows=9,316 loops=1)

  • Hash Cond: (p_parts_t.p_parts_t__p_id = amounts_maps_6.product_id)
26. 25.992 25.992 ↑ 1.0 9,316 1

CTE Scan on p_parts_t (cost=0.00..186.56 rows=9,328 width=40) (actual time=0.036..25.992 rows=9,316 loops=1)

27. 1.802 5.699 ↑ 1.0 9,166 1

Hash (cost=848.01..848.01 rows=9,459 width=10) (actual time=5.699..5.699 rows=9,166 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 526kB
28. 3.897 3.897 ↑ 1.0 9,453 1

Seq Scan on amounts_maps amounts_maps_6 (cost=0.00..848.01 rows=9,459 width=10) (actual time=0.044..3.897 rows=9,453 loops=1)

  • Filter: ((option_type = 2) AND (status = 0))
  • Rows Removed by Filter: 22660
29. 1.848 5.335 ↑ 1.0 9,293 1

Hash (cost=848.01..848.01 rows=9,752 width=10) (actual time=5.335..5.335 rows=9,293 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 561kB
30. 3.487 3.487 ↑ 1.0 9,751 1

Seq Scan on amounts_maps amounts_maps_5 (cost=0.00..848.01 rows=9,752 width=10) (actual time=0.007..3.487 rows=9,751 loops=1)

  • Filter: ((option_type = 0) AND (status = 0))
  • Rows Removed by Filter: 22362
31.          

CTE er_parts

32. 1.538 36.580 ↓ 1.0 4,397 1

Unique (cost=3,139.64..3,193.42 rows=4,396 width=168) (actual time=33.958..36.580 rows=4,397 loops=1)

33. 5.629 35.042 ↑ 1.0 10,756 1

Sort (cost=3,139.64..3,166.53 rows=10,756 width=168) (actual time=33.957..35.042 rows=10,756 loops=1)

  • Sort Key: enter_requests.product_id, ((enter_requests.payment_info_json -> 'payment_checkout_date'::text)) DESC
  • Sort Method: quicksort Memory: 1397kB
34. 29.413 29.413 ↑ 1.0 10,756 1

Seq Scan on enter_requests (cost=0.00..2,419.37 rows=10,756 width=168) (actual time=0.013..29.413 rows=10,756 loops=1)

35.          

CTE hosts_products_parts

36. 11.202 35.547 ↑ 1.0 9,281 1

GroupAggregate (cost=3,041.34..3,368.82 rows=9,281 width=132) (actual time=23.452..35.547 rows=9,281 loops=1)

  • Group Key: hosts_products.product_id
37. 4.294 24.345 ↑ 1.0 9,381 1

Sort (cost=3,041.34..3,064.99 rows=9,457 width=48) (actual time=23.439..24.345 rows=9,381 loops=1)

  • Sort Key: hosts_products.product_id
  • Sort Method: quicksort Memory: 1396kB
38. 2.824 20.051 ↑ 1.0 9,381 1

Hash Left Join (cost=2,018.92..2,416.84 rows=9,457 width=48) (actual time=13.494..20.051 rows=9,381 loops=1)

  • Hash Cond: (hosts_products.host_id = safe_numbers_1.host_id)
39. 2.957 6.203 ↑ 1.0 9,327 1

Hash Left Join (cost=320.92..507.68 rows=9,327 width=33) (actual time=2.214..6.203 rows=9,327 loops=1)

  • Hash Cond: (hosts_products.host_id = hosts_2.id)
40. 1.100 1.100 ↑ 1.0 9,327 1

Seq Scan on hosts_products (cost=0.00..162.27 rows=9,327 width=8) (actual time=0.015..1.100 rows=9,327 loops=1)

41. 0.998 2.146 ↑ 1.0 6,752 1

Hash (cost=236.52..236.52 rows=6,752 width=29) (actual time=2.146..2.146 rows=6,752 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 473kB
42. 1.148 1.148 ↑ 1.0 6,752 1

Seq Scan on hosts hosts_2 (cost=0.00..236.52 rows=6,752 width=29) (actual time=0.007..1.148 rows=6,752 loops=1)

43. 4.124 11.024 ↑ 8.1 6,150 1

Hash (cost=1,073.00..1,073.00 rows=50,000 width=19) (actual time=11.024..11.024 rows=6,150 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 825kB
44. 6.900 6.900 ↑ 1.0 50,000 1

Seq Scan on safe_numbers safe_numbers_1 (cost=0.00..1,073.00 rows=50,000 width=19) (actual time=0.008..6.900 rows=50,000 loops=1)

45.          

CTE ameniyb_parts

46. 1.534 1.973 ↑ 1.0 1,308 1

GroupAggregate (cost=0.28..148.92 rows=1,308 width=36) (actual time=0.011..1.973 rows=1,308 loops=1)

  • Group Key: amenities_buildings.building_id
47. 0.439 0.439 ↑ 1.0 1,799 1

Index Scan using ix_amenities_buildings_building_id on amenities_buildings (cost=0.28..117.04 rows=1,799 width=8) (actual time=0.006..0.439 rows=1,799 loops=1)

48.          

CTE ameniyp_parts

49. 51.659 69.661 ↓ 1.0 7,106 1

GroupAggregate (cost=0.29..4,097.62 rows=7,032 width=36) (actual time=0.056..69.661 rows=7,106 loops=1)

  • Group Key: amenities_products.product_id
50. 18.002 18.002 ↑ 1.0 74,668 1

Index Scan using ix_amenities_products_product_id on amenities_products (cost=0.29..3,601.22 rows=74,668 width=8) (actual time=0.014..18.002 rows=74,668 loops=1)

51.          

CTE product_rating_parts

52. 0.016 0.016 ↓ 3.0 3 1

Seq Scan on rating rating_1 (cost=0.00..1.82 rows=1 width=104) (actual time=0.010..0.016 rows=3 loops=1)

  • Filter: ((target_type = 'products_all'::rating_target_type) AND (point_type = 'summation'::rating_point_type))
  • Rows Removed by Filter: 51
53.          

CTE host_rating_parts

54. 0.017 0.120 ↓ 25.0 50 1

GroupAggregate (cost=13.28..13.33 rows=2 width=12) (actual time=0.104..0.120 rows=50 loops=1)

  • Group Key: hosts_products_1.product_id
55. 0.015 0.103 ↓ 25.0 50 1

Sort (cost=13.28..13.28 rows=2 width=12) (actual time=0.100..0.103 rows=50 loops=1)

  • Sort Key: hosts_products_1.product_id
  • Sort Method: quicksort Memory: 27kB
56. 0.017 0.088 ↓ 25.0 50 1

Nested Loop (cost=4.30..13.27 rows=2 width=12) (actual time=0.019..0.088 rows=50 loops=1)

57. 0.008 0.008 ↓ 7.0 7 1

Seq Scan on rating rating_2 (cost=0.00..1.95 rows=1 width=12) (actual time=0.004..0.008 rows=7 loops=1)

  • Filter: ((rating_count IS NOT NULL) AND (rating_count <> 0) AND (target_type = 'host_all'::rating_target_type) AND (point_type = 'summation'::rating_point_type))
  • Rows Removed by Filter: 47
58. 0.035 0.063 ↓ 3.5 7 7

Bitmap Heap Scan on hosts_products hosts_products_1 (cost=4.30..11.30 rows=2 width=8) (actual time=0.005..0.009 rows=7 loops=7)

  • Recheck Cond: (host_id = rating_2.target_pk)
  • Heap Blocks: exact=34
59. 0.028 0.028 ↓ 3.5 7 7

Bitmap Index Scan on ix_hosts_products_host_id (cost=0.00..4.30 rows=2 width=0) (actual time=0.004..0.004 rows=7 loops=7)

  • Index Cond: (host_id = rating_2.target_pk)
60. 38.366 1,718.198 ↓ 3.6 50 1

Sort (cost=3,842.33..3,842.36 rows=14 width=8,268) (actual time=1,718.179..1,718.198 rows=50 loops=1)

  • Sort Key: products.id DESC, attachments_1."position", attachments_2."position
  • Sort Method: top-N heapsort Memory: 789kB
61. 204.732 1,679.832 ↓ 586.1 8,206 1

WindowAgg (cost=3,555.51..3,842.06 rows=14 width=8,268) (actual time=1,634.818..1,679.832 rows=8,206 loops=1)

62. 16.079 1,475.100 ↓ 586.1 8,206 1

Nested Loop Left Join (cost=3,555.51..3,841.89 rows=14 width=8,260) (actual time=694.434..1,475.100 rows=8,206 loops=1)

63. 15.536 1,442.609 ↓ 586.1 8,206 1

Nested Loop Left Join (cost=3,555.22..3,834.05 rows=14 width=8,213) (actual time=694.417..1,442.609 rows=8,206 loops=1)

64. 12.732 1,410.661 ↓ 586.1 8,206 1

Nested Loop Left Join (cost=3,554.94..3,826.20 rows=14 width=8,166) (actual time=694.400..1,410.661 rows=8,206 loops=1)

65. 13.904 1,365.161 ↓ 585.1 8,192 1

Nested Loop Left Join (cost=3,554.52..3,808.17 rows=14 width=7,895) (actual time=694.380..1,365.161 rows=8,192 loops=1)

  • Join Filter: (room_types_2.id = room_type_products.room_type_id)
  • Rows Removed by Join Filter: 12456
66. 22.650 1,351.257 ↓ 585.1 8,192 1

Nested Loop Left Join (cost=3,554.52..3,803.20 rows=14 width=7,347) (actual time=694.357..1,351.257 rows=8,192 loops=1)

  • Join Filter: (admin_teams_2.id = users_2.admin_team_id)
  • Rows Removed by Join Filter: 81900
67. 14.602 1,320.415 ↓ 585.1 8,192 1

Nested Loop Left Join (cost=3,554.52..3,799.97 rows=14 width=6,714) (actual time=694.333..1,320.415 rows=8,192 loops=1)

68. 13.227 1,281.237 ↓ 585.1 8,192 1

Nested Loop Left Join (cost=3,554.10..3,792.80 rows=14 width=6,166) (actual time=694.309..1,281.237 rows=8,192 loops=1)

69. 15.017 1,251.626 ↓ 585.1 8,192 1

Nested Loop Left Join (cost=3,553.81..3,783.73 rows=14 width=5,535) (actual time=694.290..1,251.626 rows=8,192 loops=1)

70. 12.452 1,220.225 ↓ 630.2 8,192 1

Nested Loop Left Join (cost=3,553.52..3,776.11 rows=13 width=5,488) (actual time=694.273..1,220.225 rows=8,192 loops=1)

71. 9.117 1,207.773 ↓ 630.2 8,192 1

Nested Loop Left Join (cost=3,553.24..3,770.90 rows=13 width=5,045) (actual time=694.261..1,207.773 rows=8,192 loops=1)

72. 13.855 1,182.272 ↓ 630.2 8,192 1

Nested Loop Left Join (cost=3,552.96..3,766.80 rows=13 width=4,738) (actual time=694.247..1,182.272 rows=8,192 loops=1)

  • Join Filter: (admin_teams_1.id = users_1.admin_team_id)
  • Rows Removed by Join Filter: 81900
73. 11.827 1,160.225 ↓ 630.2 8,192 1

Nested Loop Left Join (cost=3,552.96..3,763.72 rows=13 width=4,105) (actual time=694.225..1,160.225 rows=8,192 loops=1)

74. 8.929 1,148.398 ↓ 630.2 8,192 1

Nested Loop Left Join (cost=3,552.68..3,758.52 rows=13 width=3,662) (actual time=694.216..1,148.398 rows=8,192 loops=1)

75. 4.341 1,114.893 ↓ 630.2 8,192 1

Nested Loop Left Join (cost=3,552.39..3,750.89 rows=13 width=3,615) (actual time=694.202..1,114.893 rows=8,192 loops=1)

76. 44.053 1,069.627 ↓ 629.6 8,185 1

Nested Loop Left Join (cost=3,551.97..3,732.89 rows=13 width=3,344) (actual time=694.184..1,069.627 rows=8,185 loops=1)

  • Join Filter: (products.id = host_rating_parts.product_id)
  • Rows Removed by Join Filter: 409209
77. 5.788 984.649 ↓ 629.6 8,185 1

Nested Loop Left Join (cost=3,551.97..3,732.29 rows=13 width=3,332) (actual time=694.042..984.649 rows=8,185 loops=1)

  • Join Filter: (products.id = product_rating_parts.target_pk)
  • Rows Removed by Join Filter: 24552
78. 8.793 970.676 ↓ 629.6 8,185 1

Hash Left Join (cost=3,551.97..3,731.98 rows=13 width=3,228) (actual time=694.017..970.676 rows=8,185 loops=1)

  • Hash Cond: (buildings.id = ameniyb_parts.ameniyb_bid)
79. 10.305 959.342 ↓ 629.6 8,185 1

Nested Loop Left Join (cost=3,509.46..3,687.27 rows=13 width=3,192) (actual time=691.464..959.342 rows=8,185 loops=1)

80. 8.605 940.852 ↓ 629.6 8,185 1

Nested Loop Left Join (cost=3,509.18..3,682.60 rows=13 width=3,164) (actual time=691.458..940.852 rows=8,185 loops=1)

81. 135.884 899.507 ↓ 629.6 8,185 1

Hash Right Join (cost=3,508.75..3,675.86 rows=13 width=2,616) (actual time=691.439..899.507 rows=8,185 loops=1)

  • Hash Cond: (ameniyp_parts.ameniyp_pid = products.id)
82. 72.871 72.871 ↓ 1.0 7,106 1

CTE Scan on ameniyp_parts (cost=0.00..140.64 rows=7,032 width=36) (actual time=0.058..72.871 rows=7,106 loops=1)

83. 89.051 690.752 ↓ 629.6 8,185 1

Hash (cost=3,508.59..3,508.59 rows=13 width=2,580) (actual time=690.752..690.752 rows=8,185 loops=1)

  • Buckets: 1024 (originally 1024) Batches: 16 (originally 1) Memory Usage: 4093kB
84. 9.493 601.701 ↓ 629.6 8,185 1

Nested Loop Left Join (cost=2,018.86..3,508.59 rows=13 width=2,580) (actual time=409.917..601.701 rows=8,185 loops=1)

85. 4.823 584.023 ↓ 629.6 8,185 1

Nested Loop Left Join (cost=2,018.57..3,503.49 rows=13 width=2,273) (actual time=409.905..584.023 rows=8,185 loops=1)

86. 37.719 562.830 ↓ 629.6 8,185 1

Hash Right Join (cost=2,018.29..3,495.71 rows=13 width=1,233) (actual time=409.885..562.830 rows=8,185 loops=1)

  • Hash Cond: (lb_parts.lb_bid = products.building_id)
87. 250.456 250.456 ↑ 14.1 4,402 1

CTE Scan on lb_parts (cost=0.00..1,244.02 rows=62,201 width=136) (actual time=135.007..250.456 rows=4,402 loops=1)

88. 19.528 274.655 ↓ 8,185.0 8,185 1

Hash (cost=2,018.28..2,018.28 rows=1 width=1,097) (actual time=274.654..274.655 rows=8,185 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 2 (originally 1) Memory Usage: 4033kB
89. 18.077 255.127 ↓ 8,185.0 8,185 1

Hash Right Join (cost=757.77..2,018.28 rows=1 width=1,097) (actual time=232.001..255.127 rows=8,185 loops=1)

  • Hash Cond: (safe_numbers.host_id = products.host_id)
90. 5.197 5.197 ↑ 1.0 50,000 1

Seq Scan on safe_numbers (cost=0.00..1,073.00 rows=50,000 width=66) (actual time=0.016..5.197 rows=50,000 loops=1)

91. 16.715 231.853 ↓ 8,185.0 8,185 1

Hash (cost=757.76..757.76 rows=1 width=1,031) (actual time=231.853..231.853 rows=8,185 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 2 (originally 1) Memory Usage: 4044kB
92. 15.681 215.138 ↓ 8,185.0 8,185 1

Hash Right Join (cost=537.32..757.76 rows=1 width=1,031) (actual time=182.539..215.138 rows=8,185 loops=1)

  • Hash Cond: (hosts_products_parts.p_id = products.id)
93. 40.515 40.515 ↑ 1.0 9,281 1

CTE Scan on hosts_products_parts (cost=0.00..185.62 rows=9,281 width=132) (actual time=23.455..40.515 rows=9,281 loops=1)

94. 13.661 158.942 ↓ 8,185.0 8,185 1

Hash (cost=537.31..537.31 rows=1 width=899) (actual time=158.942..158.942 rows=8,185 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 2 (originally 1) Memory Usage: 4033kB
95. 12.336 145.281 ↓ 8,185.0 8,185 1

Hash Right Join (cost=432.90..537.31 rows=1 width=899) (actual time=128.897..145.281 rows=8,185 loops=1)

  • Hash Cond: (er_parts.p_id = products.id)
96. 38.128 38.128 ↓ 1.0 4,397 1

CTE Scan on er_parts (cost=0.00..87.92 rows=4,396 width=136) (actual time=33.961..38.128 rows=4,397 loops=1)

97. 18.413 94.817 ↓ 8,185.0 8,185 1

Hash (cost=432.88..432.88 rows=1 width=763) (actual time=94.817..94.817 rows=8,185 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 2 (originally 1) Memory Usage: 4033kB
98. 10.210 76.404 ↓ 8,185.0 8,185 1

Nested Loop (cost=0.29..432.88 rows=1 width=763) (actual time=11.272..76.404 rows=8,185 loops=1)

99. 56.982 56.982 ↓ 9,212.0 9,212 1

CTE Scan on p_a_parts (cost=0.00..424.58 rows=1 width=132) (actual time=11.244..56.982 rows=9,212 loops=1)

  • Filter: (((monthly_long_include >= '0'::double precision) OR (monthly_short_include >= '0'::double precision)) AND (((monthly_long_include >= '0'::double precision) AND (monthly_long_include <= '999999990000'::double precision)) OR ((monthly_short_include >= '0'::double precision) AND (monthly_short_include <= '999999990000'::double precision))) AND (((long_deposit >= '0'::numeric) AND (long_deposit <= '999999990000'::numeric)) OR ((short_deposit >= '0'::numeric) AND (short_deposit <= '999999990000'::numeric))))
  • Rows Removed by Filter: 104
100. 9.212 9.212 ↑ 1.0 1 9,212

Index Scan using idx_658915_primary on products (cost=0.29..8.31 rows=1 width=631) (actual time=0.001..0.001 rows=1 loops=9,212)

  • Index Cond: (id = p_a_parts.p_id)
  • Filter: (status = ANY ('{0,1,3}'::smallint[]))
  • Rows Removed by Filter: 0
101. 16.370 16.370 ↑ 1.0 1 8,185

Index Scan using idx_1668234_primary on buildings (cost=0.28..0.60 rows=1 width=1,040) (actual time=0.002..0.002 rows=1 loops=8,185)

  • Index Cond: (products.building_id = id)
102. 8.185 8.185 ↑ 1.0 1 8,185

Index Scan using idx_658851_primary on hosts (cost=0.28..0.39 rows=1 width=307) (actual time=0.001..0.001 rows=1 loops=8,185)

  • Index Cond: (products.host_id = id)
103. 8.185 32.740 ↑ 1.0 1 8,185

Nested Loop (cost=0.42..0.51 rows=1 width=552) (actual time=0.004..0.004 rows=1 loops=8,185)

104. 16.370 16.370 ↑ 1.0 1 8,185

Index Scan using ix_room_type_products_product_id on room_type_products room_type_products_1 (cost=0.29..0.35 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=8,185)

  • Index Cond: (products.id = product_id)
105. 8.185 8.185 ↑ 1.0 1 8,185

Index Scan using idx_658949_primary on room_types room_types_1 (cost=0.14..0.16 rows=1 width=548) (actual time=0.001..0.001 rows=1 loops=8,185)

  • Index Cond: (id = room_type_products_1.room_type_id)
106. 8.185 8.185 ↑ 1.0 1 8,185

Index Scan using ix_room_type_products_product_id on room_type_products (cost=0.29..0.35 rows=1 width=28) (actual time=0.001..0.001 rows=1 loops=8,185)

  • Index Cond: (product_id = products.id)
107. 0.187 2.541 ↑ 1.0 1,308 1

Hash (cost=26.16..26.16 rows=1,308 width=36) (actual time=2.541..2.541 rows=1,308 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 71kB
108. 2.354 2.354 ↑ 1.0 1,308 1

CTE Scan on ameniyb_parts (cost=0.00..26.16 rows=1,308 width=36) (actual time=0.012..2.354 rows=1,308 loops=1)

109. 8.185 8.185 ↓ 3.0 3 8,185

CTE Scan on product_rating_parts (cost=0.00..0.02 rows=1 width=104) (actual time=0.000..0.001 rows=3 loops=8,185)

110. 40.925 40.925 ↓ 25.0 50 8,185

CTE Scan on host_rating_parts (cost=0.00..0.04 rows=2 width=12) (actual time=0.000..0.005 rows=50 loops=8,185)

111. 40.925 40.925 ↑ 1.0 1 8,185

Index Scan using idx_658762_index_attachments_on_content_type_and_content_id on attachments attachments_1 (cost=0.42..1.37 rows=1 width=271) (actual time=0.004..0.005 rows=1 loops=8,185)

  • Index Cond: (((content_type)::text = 'Product'::text) AND (content_id = products.id))
  • Filter: ((status = 0) AND ((category)::text = 'cover'::text))
  • Rows Removed by Filter: 4
112. 24.576 24.576 ↑ 1.0 1 8,192

Index Scan using ix_amounts_maps_product_id on amounts_maps amounts_maps_2 (cost=0.29..0.58 rows=1 width=47) (actual time=0.002..0.003 rows=1 loops=8,192)

  • Index Cond: (product_id = products.id)
  • Filter: ((option_type = 2) AND (status = 0))
  • Rows Removed by Filter: 2
113. 0.000 0.000 ↓ 0.0 0 8,192

Index Scan using idx_659020_primary on users users_1 (cost=0.28..0.40 rows=1 width=443) (actual time=0.000..0.000 rows=0 loops=8,192)

  • Index Cond: (hosts.user_id = id)
114. 8.185 8.192 ↑ 1.0 10 8,192

Materialize (cost=0.00..1.15 rows=10 width=633) (actual time=0.000..0.001 rows=10 loops=8,192)

115. 0.007 0.007 ↑ 1.0 10 1

Seq Scan on admin_teams admin_teams_1 (cost=0.00..1.10 rows=10 width=633) (actual time=0.005..0.007 rows=10 loops=1)

116. 16.384 16.384 ↑ 1.0 1 8,192

Index Scan using idx_658851_primary on hosts hosts_1 (cost=0.28..0.32 rows=1 width=307) (actual time=0.002..0.002 rows=1 loops=8,192)

  • Index Cond: (safe_numbers.host_id = id)
117. 0.000 0.000 ↓ 0.0 0 8,192

Index Scan using idx_659020_primary on users users_2 (cost=0.28..0.40 rows=1 width=443) (actual time=0.000..0.000 rows=0 loops=8,192)

  • Index Cond: (hosts_1.user_id = id)
118. 16.384 16.384 ↑ 1.0 1 8,192

Index Scan using ix_amounts_maps_product_id on amounts_maps amounts_maps_1 (cost=0.29..0.58 rows=1 width=47) (actual time=0.002..0.002 rows=1 loops=8,192)

  • Index Cond: (product_id = products.id)
  • Filter: ((option_type = 0) AND (status = 0))
  • Rows Removed by Filter: 2
119. 16.384 16.384 ↑ 1.0 1 8,192

Index Scan using idx_658915_primary on products products_1 (cost=0.29..0.65 rows=1 width=631) (actual time=0.002..0.002 rows=1 loops=8,192)

  • Index Cond: (id = room_type_products.product_id)
120. 0.000 24.576 ↑ 1.0 1 8,192

Nested Loop (cost=0.42..0.50 rows=1 width=552) (actual time=0.003..0.003 rows=1 loops=8,192)

121. 16.384 16.384 ↑ 1.0 1 8,192

Index Scan using ix_room_type_products_product_id on room_type_products room_type_products_2 (cost=0.29..0.34 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=8,192)

  • Index Cond: (products_1.id = product_id)
122. 8.192 8.192 ↑ 1.0 1 8,192

Index Scan using idx_658949_primary on room_types room_types_3 (cost=0.14..0.16 rows=1 width=548) (actual time=0.001..0.001 rows=1 loops=8,192)

  • Index Cond: (id = room_type_products_2.room_type_id)
123. 8.187 8.192 ↑ 1.0 10 8,192

Materialize (cost=0.00..1.15 rows=10 width=633) (actual time=0.000..0.001 rows=10 loops=8,192)

124. 0.005 0.005 ↑ 1.0 10 1

Seq Scan on admin_teams admin_teams_2 (cost=0.00..1.10 rows=10 width=633) (actual time=0.003..0.005 rows=10 loops=1)

125. 0.000 0.000 ↑ 6.3 3 8,192

Materialize (cost=0.00..1.28 rows=19 width=548) (actual time=0.000..0.000 rows=3 loops=8,192)

126. 0.007 0.007 ↑ 1.0 19 1

Seq Scan on room_types room_types_2 (cost=0.00..1.19 rows=19 width=548) (actual time=0.003..0.007 rows=19 loops=1)

127. 32.768 32.768 ↑ 1.0 1 8,192

Index Scan using idx_658762_index_attachments_on_content_type_and_content_id on attachments attachments_2 (cost=0.42..1.28 rows=1 width=271) (actual time=0.003..0.004 rows=1 loops=8,192)

  • Index Cond: (((content_type)::text = 'Product'::text) AND (content_id = products_1.id))
  • Filter: ((status = 0) AND ((category)::text = 'cover'::text))
  • Rows Removed by Filter: 4
128. 16.412 16.412 ↑ 1.0 1 8,206

Index Scan using ix_amounts_maps_product_id on amounts_maps amounts_maps_3 (cost=0.29..0.55 rows=1 width=47) (actual time=0.002..0.002 rows=1 loops=8,206)

  • Index Cond: (product_id = products_1.id)
  • Filter: ((option_type = 0) AND (status = 0))
  • Rows Removed by Filter: 2
129. 16.412 16.412 ↑ 1.0 1 8,206

Index Scan using ix_amounts_maps_product_id on amounts_maps amounts_maps_4 (cost=0.29..0.55 rows=1 width=47) (actual time=0.001..0.002 rows=1 loops=8,206)

  • Index Cond: (product_id = products_1.id)
  • Filter: ((option_type = 2) AND (status = 0))
  • Rows Removed by Filter: 2
Planning time : 20.959 ms
Execution time : 1,733.234 ms