explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aqOG

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 820.749 ↑ 1.0 50 1

Limit (cost=27,736.40..27,736.53 rows=50 width=380) (actual time=820.667..820.749 rows=50 loops=1)

2.          

CTE cte_root

3. 0.567 1.278 ↓ 3.2 1,724 1

HashAggregate (cost=1,321.64..1,327.11 rows=547 width=8) (actual time=1.103..1.278 rows=1,724 loops=1)

  • Group Key: o_1.id, o_1.customer_id
4. 0.116 0.711 ↓ 3.2 1,724 1

Append (cost=13.88..1,318.90 rows=547 width=8) (actual time=0.115..0.711 rows=1,724 loops=1)

5. 0.501 0.594 ↓ 3.2 1,724 1

Bitmap Heap Scan on orders o_1 (cost=13.88..1,310.70 rows=545 width=8) (actual time=0.115..0.594 rows=1,724 loops=1)

  • Recheck Cond: ((create_stamp > '2020-07-30 00:00:00+00'::timestamp with time zone) AND (create_stamp < '2020-08-02 00:00:00+00'::timestamp with time zone))
  • Filter: (location_id = ANY ('{51,52,53,54,55}'::integer[]))
  • Heap Blocks: exact=124
6. 0.093 0.093 ↓ 3.2 1,770 1

Bitmap Index Scan on orders_create_stamp (cost=0.00..13.74 rows=545 width=0) (actual time=0.093..0.093 rows=1,770 loops=1)

  • Index Cond: ((create_stamp > '2020-07-30 00:00:00+00'::timestamp with time zone) AND (create_stamp < '2020-08-02 00:00:00+00'::timestamp with time zone))
7. 0.000 0.001 ↓ 0.0 0 1

HashAggregate (cost=0.00..0.01 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Group Key: order_id, customer_id
8. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
9. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=0) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
10.          

CTE cte_deep_filter

11. 0.664 2.456 ↓ 3.1 1,724 1

HashAggregate (cost=27.45..32.97 rows=552 width=164) (actual time=2.196..2.456 rows=1,724 loops=1)

  • Group Key: cte_root.order_id, (NULL::text), (NULL::text), (NULL::text), (NULL::text), (NULL::text)
12. 0.118 1.792 ↓ 3.1 1,724 1

Append (cost=0.00..19.17 rows=552 width=164) (actual time=1.106..1.792 rows=1,724 loops=1)

13. 1.672 1.672 ↓ 3.2 1,724 1

CTE Scan on cte_root (cost=0.00..10.94 rows=547 width=164) (actual time=1.105..1.672 rows=1,724 loops=1)

14. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=103) (actual time=0.000..0.001 rows=0 loops=1)

  • One-Time Filter: false
15. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=164) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
16. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=164) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
17. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=164) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
18. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=164) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
19.          

CTE cte_reserved_slots_grouped_by_start_time

20. 0.000 0.000 ↓ 0.0 0

Unique (cost=7,238.73..7,242.73 rows=200 width=37) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Sort (cost=7,238.73..7,239.23 rows=200 width=37) (never executed)

  • Sort Key: reserved_slots_grouped_by_item_id.order_id, ((sum(reserved_slots_grouped_by_item_id.total_gross_slots))::integer), ((sum(reserved_slots_grouped_by_item_id.count_reserved))::integer), reserved_slots_grouped_by_item_id.item_scheduled_start_time, (max(reserved_slots_grouped_by_item_id.end_time)), (bool_or(reserved_slots_grouped_by_item_id.is_all_day_event)), (min(reserved_slots_grouped_by_item_id.all_day_date))
22. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=7,203.67..7,231.09 rows=200 width=37) (never executed)

  • Group Key: reserved_slots_grouped_by_item_id.order_id, reserved_slots_grouped_by_item_id.item_scheduled_start_time
23. 0.000 0.000 ↓ 0.0 0

Sort (cost=7,203.67..7,206.72 rows=1,221 width=37) (never executed)

  • Sort Key: reserved_slots_grouped_by_item_id.order_id, reserved_slots_grouped_by_item_id.item_scheduled_start_time
24. 0.000 0.000 ↓ 0.0 0

Subquery Scan on reserved_slots_grouped_by_item_id (cost=7,101.39..7,141.07 rows=1,221 width=37) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Unique (cost=7,101.39..7,128.86 rows=1,221 width=57) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Sort (cost=7,101.39..7,104.44 rows=1,221 width=57) (never executed)

  • Sort Key: o_2.id, (max(COALESCE((rs.qty_people_included * rs.qty), 0))), ((min(COALESCE((COALESCE(count(*), '0'::bigint)), '0'::bigint)))::integer), rs.order_item_id, (min(rs.item_scheduled_start_time)), (max(rs.end_time)), (bool_or(rs.is_all_day_event)), (min(rs.all_day_date))
27. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=6,983.84..7,038.79 rows=1,221 width=57) (never executed)

  • Group Key: o_2.id, rs.order_item_id, rs.qty_people_included, rs.qty, (COALESCE(count(*), '0'::bigint))
28. 0.000 0.000 ↓ 0.0 0

Sort (cost=6,983.84..6,986.89 rows=1,221 width=49) (never executed)

  • Sort Key: o_2.id, rs.order_item_id, rs.qty_people_included, rs.qty, (COALESCE(count(*), '0'::bigint))
29. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=6,108.34..6,921.24 rows=1,221 width=49) (never executed)

  • Hash Cond: (oi.id = poat.order_item_id)
30. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=6,107.27..6,915.58 rows=1,221 width=53) (never executed)

  • Hash Cond: (oi.sku = p.id)
31. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=6,013.42..6,818.52 rows=1,221 width=57) (never executed)

  • Hash Cond: (crspl.reserved_slot_id = rs.id)
32. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=1,741.52..2,079.45 rows=33,793 width=12) (never executed)

  • Group Key: crspl.reserved_slot_id
33. 0.000 0.000 ↓ 0.0 0

Seq Scan on customer_reserved_slot_participation_link crspl (cost=0.00..1,382.01 rows=71,901 width=4) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Hash (cost=4,256.65..4,256.65 rows=1,221 width=53) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=2.72..4,256.65 rows=1,221 width=53) (never executed)

  • Hash Cond: (rs.facility_id = f.id)
36. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.13..4,250.45 rows=1,511 width=57) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.71..3,367.65 rows=1,529 width=12) (never executed)

  • Join Filter: (cdf.order_id = oi.order_id)
38. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..2,978.16 rows=552 width=8) (never executed)

39. 0.000 0.000 ↓ 0.0 0

CTE Scan on cte_deep_filter cdf (cost=0.00..11.04 rows=552 width=4) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Index Only Scan using orders_pkey on orders o_2 (cost=0.29..5.38 rows=1 width=4) (never executed)

  • Index Cond: (id = cdf.order_id)
  • Heap Fetches: 0
41. 0.000 0.000 ↓ 0.0 0

Index Scan using order_items_order_id on order_items oi (cost=0.42..0.67 rows=3 width=12) (never executed)

  • Index Cond: (order_id = o_2.id)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using reserved_slots_order_item_id on reserved_slots rs (cost=0.42..0.56 rows=2 width=45) (never executed)

  • Index Cond: (order_item_id = oi.id)
  • Filter: (qty > 0)
43. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.32..1.32 rows=21 width=4) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Seq Scan on facilities f (cost=0.00..1.32 rows=21 width=4) (never executed)

  • Filter: (facility_type = ANY ('{0,3}'::integer[]))
45. 0.000 0.000 ↓ 0.0 0

Hash (cost=76.77..76.77 rows=1,366 width=4) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Index Only Scan using products_pkey on products p (cost=0.28..76.77 rows=1,366 width=4) (never executed)

  • Heap Fetches: 0
47. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.05..1.05 rows=2 width=4) (never executed)

48. 0.000 0.000 ↓ 0.0 0

Seq Scan on products_on_account_transactions poat (cost=0.00..1.05 rows=2 width=4) (never executed)

  • Filter: created_as_rain_check
49.          

CTE cte_reserved_slots_grouped_by_order_id

50. 0.179 72.141 ↓ 4.6 925 1

Unique (cost=7,173.08..7,177.08 rows=200 width=37) (actual time=71.922..72.141 rows=925 loops=1)

51. 0.206 71.962 ↓ 4.6 925 1

Sort (cost=7,173.08..7,173.58 rows=200 width=37) (actual time=71.921..71.962 rows=925 loops=1)

  • Sort Key: o_3.id, ((sum((max(COALESCE((rs_1.qty_people_included * rs_1.qty), 0)))))::integer), ((sum(((min(COALESCE((COALESCE(count(*), '0'::bigint)), '0'::bigint)))::integer)))::integer), (min((min(rs_1.item_scheduled_start_time)))), (max((max(rs_1.end_time)))), (bool_or((bool_or(rs_1.is_all_day_event)))), (min((min(rs_1.all_day_date))))
  • Sort Method: quicksort Memory: 97kB
52. 0.433 71.756 ↓ 4.6 925 1

GroupAggregate (cost=7,101.39..7,165.44 rows=200 width=37) (actual time=70.973..71.756 rows=925 loops=1)

  • Group Key: o_3.id
53. 0.297 71.323 ↓ 1.2 1,427 1

Unique (cost=7,101.39..7,128.86 rows=1,221 width=57) (actual time=70.963..71.323 rows=1,427 loops=1)

54. 0.610 71.026 ↓ 1.2 1,427 1

Sort (cost=7,101.39..7,104.44 rows=1,221 width=57) (actual time=70.961..71.026 rows=1,427 loops=1)

  • Sort Key: o_3.id, (max(COALESCE((rs_1.qty_people_included * rs_1.qty), 0))), ((min(COALESCE((COALESCE(count(*), '0'::bigint)), '0'::bigint)))::integer), rs_1.order_item_id, (min(rs_1.item_scheduled_start_time)), (max(rs_1.end_time)), (bool_or(rs_1.is_all_day_event)), (min(rs_1.all_day_date))
  • Sort Method: quicksort Memory: 249kB
55. 1.099 70.416 ↓ 1.2 1,427 1

GroupAggregate (cost=6,983.84..7,038.79 rows=1,221 width=57) (actual time=69.188..70.416 rows=1,427 loops=1)

  • Group Key: o_3.id, rs_1.order_item_id, rs_1.qty_people_included, rs_1.qty, (COALESCE(count(*), '0'::bigint))
56. 2.946 69.317 ↓ 2.3 2,817 1

Sort (cost=6,983.84..6,986.89 rows=1,221 width=49) (actual time=69.160..69.317 rows=2,817 loops=1)

  • Sort Key: o_3.id, rs_1.order_item_id, rs_1.qty_people_included, rs_1.qty, (COALESCE(count(*), '0'::bigint))
  • Sort Method: quicksort Memory: 458kB
57. 0.543 66.371 ↓ 2.3 2,817 1

Hash Left Join (cost=6,108.34..6,921.24 rows=1,221 width=49) (actual time=42.584..66.371 rows=2,817 loops=1)

  • Hash Cond: (oi_1.id = poat_1.order_item_id)
58. 0.775 65.817 ↓ 2.3 2,817 1

Hash Join (cost=6,107.27..6,915.58 rows=1,221 width=53) (actual time=42.557..65.817 rows=2,817 loops=1)

  • Hash Cond: (oi_1.sku = p_1.id)
59. 6.344 64.683 ↓ 2.3 2,817 1

Hash Right Join (cost=6,013.42..6,818.52 rows=1,221 width=57) (actual time=42.193..64.683 rows=2,817 loops=1)

  • Hash Cond: (crspl_1.reserved_slot_id = rs_1.id)
60. 36.373 43.107 ↓ 1.3 42,413 1

HashAggregate (cost=1,741.52..2,079.45 rows=33,793 width=12) (actual time=26.948..43.107 rows=42,413 loops=1)

  • Group Key: crspl_1.reserved_slot_id
61. 6.734 6.734 ↓ 1.0 73,676 1

Seq Scan on customer_reserved_slot_participation_link crspl_1 (cost=0.00..1,382.01 rows=71,901 width=4) (actual time=0.011..6.734 rows=73,676 loops=1)

62. 0.784 15.232 ↓ 2.3 2,817 1

Hash (cost=4,256.65..4,256.65 rows=1,221 width=53) (actual time=15.232..15.232 rows=2,817 loops=1)

  • Buckets: 4,096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 286kB
63. 0.691 14.448 ↓ 2.3 2,817 1

Hash Join (cost=2.72..4,256.65 rows=1,221 width=53) (actual time=0.061..14.448 rows=2,817 loops=1)

  • Hash Cond: (rs_1.facility_id = f_1.id)
64. 0.111 13.737 ↓ 1.9 2,819 1

Nested Loop (cost=1.13..4,250.45 rows=1,511 width=57) (actual time=0.036..13.737 rows=2,819 loops=1)

65. 0.615 7.330 ↓ 2.1 3,148 1

Nested Loop (cost=0.71..3,367.65 rows=1,529 width=12) (actual time=0.017..7.330 rows=3,148 loops=1)

  • Join Filter: (cdf_1.order_id = oi_1.order_id)
66. 1.131 3.267 ↓ 3.1 1,724 1

Nested Loop (cost=0.29..2,978.16 rows=552 width=8) (actual time=0.008..3.267 rows=1,724 loops=1)

67. 0.412 0.412 ↓ 3.1 1,724 1

CTE Scan on cte_deep_filter cdf_1 (cost=0.00..11.04 rows=552 width=4) (actual time=0.001..0.412 rows=1,724 loops=1)

68. 1.724 1.724 ↑ 1.0 1 1,724

Index Only Scan using orders_pkey on orders o_3 (cost=0.29..5.38 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1,724)

  • Index Cond: (id = cdf_1.order_id)
  • Heap Fetches: 1,724
69. 3.448 3.448 ↑ 1.5 2 1,724

Index Scan using order_items_order_id on order_items oi_1 (cost=0.42..0.67 rows=3 width=12) (actual time=0.001..0.002 rows=2 loops=1,724)

  • Index Cond: (order_id = o_3.id)
70. 6.296 6.296 ↑ 2.0 1 3,148

Index Scan using reserved_slots_order_item_id on reserved_slots rs_1 (cost=0.42..0.56 rows=2 width=45) (actual time=0.001..0.002 rows=1 loops=3,148)

  • Index Cond: (order_item_id = oi_1.id)
  • Filter: (qty > 0)
  • Rows Removed by Filter: 0
71. 0.004 0.020 ↑ 1.0 21 1

Hash (cost=1.32..1.32 rows=21 width=4) (actual time=0.019..0.020 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
72. 0.016 0.016 ↑ 1.0 21 1

Seq Scan on facilities f_1 (cost=0.00..1.32 rows=21 width=4) (actual time=0.012..0.016 rows=21 loops=1)

  • Filter: (facility_type = ANY ('{0,3}'::integer[]))
  • Rows Removed by Filter: 6
73. 0.139 0.359 ↓ 1.0 1,383 1

Hash (cost=76.77..76.77 rows=1,366 width=4) (actual time=0.359..0.359 rows=1,383 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 65kB
74. 0.220 0.220 ↓ 1.0 1,383 1

Index Only Scan using products_pkey on products p_1 (cost=0.28..76.77 rows=1,366 width=4) (actual time=0.010..0.220 rows=1,383 loops=1)

  • Heap Fetches: 351
75. 0.000 0.011 ↓ 0.0 0 1

Hash (cost=1.05..1.05 rows=2 width=4) (actual time=0.011..0.011 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
76. 0.011 0.011 ↓ 0.0 0 1

Seq Scan on products_on_account_transactions poat_1 (cost=0.00..1.05 rows=2 width=4) (actual time=0.011..0.011 rows=0 loops=1)

  • Filter: created_as_rain_check
  • Rows Removed by Filter: 5
77.          

CTE cte_count_non_event_items

78. 0.605 14.971 ↑ 1.4 1,111 1

HashAggregate (cost=8,296.27..8,315.19 rows=1,514 width=8) (actual time=14.825..14.971 rows=1,111 loops=1)

  • Group Key: oi_2.order_id
79. 0.603 14.366 ↓ 1.0 1,587 1

Hash Anti Join (cost=4,568.77..8,288.70 rows=1,514 width=8) (actual time=10.159..14.366 rows=1,587 loops=1)

  • Hash Cond: (oi_2.id = oi_3.id)
80. 0.000 3.638 ↓ 2.1 3,148 1

Nested Loop (cost=0.42..3,701.17 rows=1,529 width=12) (actual time=0.025..3.638 rows=3,148 loops=1)

81. 0.218 0.218 ↓ 3.1 1,724 1

CTE Scan on cte_deep_filter cdf_2 (cost=0.00..11.04 rows=552 width=4) (actual time=0.001..0.218 rows=1,724 loops=1)

82. 3.448 3.448 ↑ 1.5 2 1,724

Index Scan using order_items_order_id on order_items oi_2 (cost=0.42..6.66 rows=3 width=12) (actual time=0.001..0.002 rows=2 loops=1,724)

  • Index Cond: (order_id = cdf_2.order_id)
83. 0.443 10.125 ↓ 2.0 3,056 1

Hash (cost=4,548.92..4,548.92 rows=1,555 width=4) (actual time=10.125..10.125 rows=3,056 loops=1)

  • Buckets: 4,096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 140kB
84. 2.432 9.682 ↓ 2.0 3,056 1

Nested Loop (cost=0.84..4,548.92 rows=1,555 width=4) (actual time=0.024..9.682 rows=3,056 loops=1)

85. 0.380 4.102 ↓ 2.1 3,148 1

Nested Loop (cost=0.42..3,701.17 rows=1,529 width=4) (actual time=0.004..4.102 rows=3,148 loops=1)

86. 0.274 0.274 ↓ 3.1 1,724 1

CTE Scan on cte_deep_filter cdf_3 (cost=0.00..11.04 rows=552 width=4) (actual time=0.000..0.274 rows=1,724 loops=1)

87. 3.448 3.448 ↑ 1.5 2 1,724

Index Scan using order_items_order_id on order_items oi_3 (cost=0.42..6.66 rows=3 width=8) (actual time=0.002..0.002 rows=2 loops=1,724)

  • Index Cond: (order_id = cdf_3.order_id)
88. 3.148 3.148 ↑ 2.0 1 3,148

Index Only Scan using reserved_slots_order_item_id on reserved_slots rs_2 (cost=0.42..0.53 rows=2 width=4) (actual time=0.001..0.001 rows=1 loops=3,148)

  • Index Cond: (order_item_id = oi_3.id)
  • Heap Fetches: 3,208
89.          

Initplan (for Limit)

90. 0.260 0.391 ↑ 1.0 1 1

Aggregate (cost=12.42..12.43 rows=1 width=32) (actual time=0.391..0.391 rows=1 loops=1)

91. 0.131 0.131 ↓ 3.1 1,724 1

CTE Scan on cte_deep_filter this_cte (cost=0.00..11.04 rows=552 width=4) (actual time=0.001..0.131 rows=1,724 loops=1)

92. 0.923 820.737 ↑ 69.7 60 1

Sort (cost=3,628.87..3,639.31 rows=4,179 width=380) (actual time=820.664..820.737 rows=60 loops=1)

  • Sort Key: o.create_stamp
  • Sort Method: top-N heapsort Memory: 48kB
93. 0.646 819.814 ↑ 2.4 1,724 1

Hash Left Join (cost=3,041.31..3,484.55 rows=4,179 width=380) (actual time=811.227..819.814 rows=1,724 loops=1)

  • Hash Cond: (cte_deep_filter.order_id = ccnei.order_id)
94. 0.721 803.694 ↓ 3.1 1,724 1

Hash Left Join (cost=2,992.11..3,287.98 rows=552 width=317) (actual time=795.737..803.694 rows=1,724 loops=1)

  • Hash Cond: (cte_deep_filter.order_id = crsgboi.order_id)
95. 0.540 730.461 ↓ 3.1 1,724 1

Nested Loop Left Join (cost=2,985.61..3,260.78 rows=552 width=284) (actual time=723.214..730.461 rows=1,724 loops=1)

  • Join Filter: false
96. 0.547 729.921 ↓ 3.1 1,724 1

Nested Loop (cost=2,985.61..3,255.26 rows=552 width=251) (actual time=723.211..729.921 rows=1,724 loops=1)

97. 1.009 724.202 ↓ 3.1 1,724 1

Hash Right Join (cost=2,985.31..2,999.13 rows=552 width=216) (actual time=723.193..724.202 rows=1,724 loops=1)

  • Hash Cond: (balance_summary.order_id = o.id)
98. 717.375 717.375 ↓ 1.7 1,724 1

Function Scan on get_balance_summary_4 balance_summary (cost=0.25..10.25 rows=1,000 width=132) (actual time=717.211..717.375 rows=1,724 loops=1)

99. 0.582 5.818 ↓ 3.1 1,724 1

Hash (cost=2,978.16..2,978.16 rows=552 width=88) (actual time=5.818..5.818 rows=1,724 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 118kB
100. 0.707 5.236 ↓ 3.1 1,724 1

Nested Loop (cost=0.29..2,978.16 rows=552 width=88) (actual time=2.206..5.236 rows=1,724 loops=1)

101. 2.805 2.805 ↓ 3.1 1,724 1

CTE Scan on cte_deep_filter (cost=0.00..11.04 rows=552 width=68) (actual time=2.197..2.805 rows=1,724 loops=1)

102. 1.724 1.724 ↑ 1.0 1 1,724

Index Scan using orders_pkey on orders o (cost=0.29..5.38 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=1,724)

  • Index Cond: (id = cte_deep_filter.order_id)
103. 5.172 5.172 ↑ 1.0 1 1,724

Index Scan using customers_pkey on customers c (cost=0.29..0.46 rows=1 width=39) (actual time=0.003..0.003 rows=1 loops=1,724)

  • Index Cond: (id = o.customer_id)
104. 0.000 0.000 ↓ 0.0 0 1,724

Result (cost=0.00..0.00 rows=0 width=33) (actual time=0.000..0.000 rows=0 loops=1,724)

  • One-Time Filter: false
105. 0.158 72.512 ↓ 4.6 925 1

Hash (cost=4.00..4.00 rows=200 width=37) (actual time=72.512..72.512 rows=925 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 70kB
106. 72.354 72.354 ↓ 4.6 925 1

CTE Scan on cte_reserved_slots_grouped_by_order_id crsgboi (cost=0.00..4.00 rows=200 width=37) (actual time=71.925..72.354 rows=925 loops=1)

107. 0.200 15.474 ↑ 1.4 1,111 1

Hash (cost=30.28..30.28 rows=1,514 width=8) (actual time=15.474..15.474 rows=1,111 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 60kB
108. 15.274 15.274 ↑ 1.4 1,111 1

CTE Scan on cte_count_non_event_items ccnei (cost=0.00..30.28 rows=1,514 width=8) (actual time=14.827..15.274 rows=1,111 loops=1)