explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RPyq

Settings
# exclusive inclusive rows x rows loops node
1. 0.261 1,028.258 ↑ 6.0 491 1

Nested Loop (cost=639.34..5,737,831.73 rows=2,931 width=100) (actual time=399.387..1,028.258 rows=491 loops=1)

2. 0.038 993.106 ↑ 4.9 23 1

Nested Loop (cost=0.84..25,980.12 rows=113 width=37) (actual time=398.079..993.106 rows=23 loops=1)

3. 10.730 10.730 ↓ 7.0 7 1

Index Scan using restaurants_geometry_to_geography_index on restaurants (cost=0.28..8.68 rows=1 width=37) (actual time=5.620..10.730 rows=7 loops=1)

  • Index Cond: ((geometry)::geography && '0101000020E6100000116F9D7FBB975DC045F5D6C056F14040'::geography)
  • Filter: (('0101000020E6100000116F9D7FBB975DC045F5D6C056F14040'::geography && _st_expand((geometry)::geography, '1100'::double precision)) AND _st_dwithin((geometry)::geography, '0101000020E6100000116F9D7FBB975DC045F5D6C056F14040'::geography, '1100'::double precision, true))
  • Rows Removed by Filter: 4
4. 113.802 982.338 ↑ 216.3 3 7

Index Scan using item_combinations_restaurant_id_index on item_combinations (cost=0.56..25,964.95 rows=649 width=74) (actual time=137.363..140.334 rows=3 loops=7)

  • 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: 421
5.          

SubPlan (forIndex Scan)

6. 742.000 742.000 ↓ 0.0 0 2,968

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.250..0.250 rows=0 loops=2,968)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'cheese'::text))
  • Heap Fetches: 0
7. 9.773 9.773 ↓ 0.0 0 337

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.029..0.029 rows=0 loops=337)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'bacon'::text))
  • Heap Fetches: 0
8. 0.187 0.187 ↑ 2.0 1 17

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.011..0.011 rows=1 loops=17)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'burger'::text))
  • Heap Fetches: 0
9. 115.284 115.284 ↓ 0.0 0 2,956

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.039..0.039 rows=0 loops=2,956)

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

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.034..0.034 rows=0 loops=38)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'smoothie'::text))
  • Heap Fetches: 0
11. 1.932 34.891 ↑ 625.4 21 23

Bitmap Heap Scan on item_combinations_index (cost=638.49..50,416.02 rows=13,134 width=100) (actual time=1.466..1.517 rows=21 loops=23)

  • Recheck Cond: (item_combination_id = item_combinations.combination_id)
  • Heap Blocks: exact=30
12. 32.959 32.959 ↑ 625.4 21 23

Bitmap Index Scan on item_combinations_index_comb_id_idx (cost=0.00..635.21 rows=13,134 width=0) (actual time=1.433..1.433 rows=21 loops=23)

  • Index Cond: (item_combination_id = item_combinations.combination_id)
Planning time : 13.200 ms
Execution time : 1,028.442 ms