explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ieRR

Settings
# exclusive inclusive rows x rows loops node
1. 2.735 10,266.681 ↓ 1.8 5,409 1

Nested Loop (cost=639.34..5,737,831.73 rows=2,931 width=100) (actual time=1,876.017..10,266.681 rows=5,409 loops=1)

2. 0.244 9,998.181 ↓ 1.0 115 1

Nested Loop (cost=0.84..25,980.12 rows=113 width=37) (actual time=1,874.304..9,998.181 rows=115 loops=1)

3. 51.624 51.624 ↓ 41.0 41 1

Index Scan using restaurants_geometry_to_geography_index on restaurants (cost=0.28..8.68 rows=1 width=37) (actual time=7.719..51.624 rows=41 loops=1)

  • Index Cond: ((geometry)::geography && '0101000020E610000043209738F29E5DC0888043A852014140'::geography)
  • Filter: (('0101000020E610000043209738F29E5DC0888043A852014140'::geography && _st_expand((geometry)::geography, '1100'::double precision)) AND _st_dwithin((geometry)::geography, '0101000020E610000043209738F29E5DC0888043A852014140'::geography, '1100'::double precision, true))
  • Rows Removed by Filter: 64
4. 776.087 9,946.313 ↑ 216.3 3 41

Index Scan using item_combinations_restaurant_id_index on item_combinations (cost=0.56..25,964.95 rows=649 width=74) (actual time=210.524..242.593 rows=3 loops=41)

  • Index Cond: (restaurant_id = restaurants.restaurant_id)
  • Filter: (((SubPlan 1) AND (SubPlan 2) AND (SubPlan 3)) OR ((SubPlan 4) AND (SubPlan 5)))
  • Rows Removed by Filter: 275
5.          

SubPlan (forIndex Scan)

6. 8,299.928 8,299.928 ↓ 0.0 0 11,401

Index Only Scan using item_combinations_index_pkey on item_combinations_index item_combinations_index_1 (cost=0.70..6.15 rows=144 width=0) (actual time=0.728..0.728 rows=0 loops=11,401)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'cheese'::text))
  • Heap Fetches: 0
7. 77.355 77.355 ↓ 0.0 0 2,865

Index Only Scan using item_combinations_index_pkey on item_combinations_index item_combinations_index_2 (cost=0.70..5.20 rows=49 width=0) (actual time=0.027..0.027 rows=0 loops=2,865)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'bacon'::text))
  • Heap Fetches: 0
8. 5.490 5.490 ↓ 0.0 0 549

Index Only Scan using item_combinations_index_pkey on item_combinations_index item_combinations_index_3 (cost=0.70..4.73 rows=2 width=0) (actual time=0.010..0.010 rows=0 loops=549)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'burger'::text))
  • Heap Fetches: 0
9. 756.497 756.497 ↓ 0.0 0 11,291

Index Only Scan using item_combinations_index_pkey on item_combinations_index item_combinations_index_4 (cost=0.70..4.73 rows=2 width=0) (actual time=0.067..0.067 rows=0 loops=11,291)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'mango'::text))
  • Heap Fetches: 0
10. 30.956 30.956 ↓ 0.0 0 284

Index Only Scan using item_combinations_index_pkey on item_combinations_index item_combinations_index_5 (cost=0.70..4.73 rows=2 width=0) (actual time=0.109..0.109 rows=0 loops=284)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'smoothie'::text))
  • Heap Fetches: 0
11. 84.065 265.765 ↑ 279.4 47 115

Bitmap Heap Scan on item_combinations_index (cost=638.49..50,416.02 rows=13,134 width=100) (actual time=2.107..2.311 rows=47 loops=115)

  • Recheck Cond: (item_combination_id = item_combinations.combination_id)
  • Heap Blocks: exact=218
12. 181.700 181.700 ↑ 279.4 47 115

Bitmap Index Scan on item_combinations_index_comb_id_idx (cost=0.00..635.21 rows=13,134 width=0) (actual time=1.580..1.580 rows=47 loops=115)

  • Index Cond: (item_combination_id = item_combinations.combination_id)
Planning time : 41.843 ms
Execution time : 10,267.839 ms