explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Vltp

Settings
# exclusive inclusive rows x rows loops node
1. 12.641 390.855 ↓ 518.0 518 1

Nested Loop (cost=147.87..7,639.43 rows=1 width=37) (actual time=7.697..390.855 rows=518 loops=1)

2. 8.528 225.838 ↓ 3,174.5 12,698 1

Nested Loop (cost=147.17..7,628.73 rows=4 width=37) (actual time=0.231..225.838 rows=12,698 loops=1)

3. 13.197 13.197 ↓ 2,243.0 2,243 1

Index Scan using restaurants_geometry_to_geography_index on restaurants (cost=0.28..8.68 rows=1 width=37) (actual time=0.199..13.197 rows=2,243 loops=1)

  • Index Cond: ((geometry)::geography && '0101000020E6100000F296AB1F9B7F52C00A4966F50E5D4440'::geography)
  • Filter: (('0101000020E6100000F296AB1F9B7F52C00A4966F50E5D4440'::geography && _st_expand((geometry)::geography, '2500'::double precision)) AND _st_dwithin((geometry)::geography, '0101000020E6100000F296AB1F9B7F52C00A4966F50E5D4440'::geography, '2500'::double precision, true))
  • Rows Removed by Filter: 777
4. 148.038 204.113 ↑ 3.8 6 2,243

Bitmap Heap Scan on item_combinations (cost=146.89..7,619.82 rows=23 width=74) (actual time=0.060..0.091 rows=6 loops=2,243)

  • Recheck Cond: (restaurant_id = restaurants.restaurant_id)
  • Filter: (item_type = 'drink'::text)
  • Rows Removed by Filter: 209
  • Heap Blocks: exact=59250
5. 56.075 56.075 ↑ 8.2 234 2,243

Bitmap Index Scan on item_combinations_restaurant_id_index (cost=0.00..146.88 rows=1,909 width=0) (actual time=0.025..0.025 rows=234 loops=2,243)

  • Index Cond: (restaurant_id = restaurants.restaurant_id)
6. 152.376 152.376 ↓ 0.0 0 12,698

Index Only Scan using item_combinations_index_pkey on item_combinations_index (cost=0.70..4.65 rows=2 width=37) (actual time=0.012..0.012 rows=0 loops=12,698)

  • Index Cond: ((item_combination_id = item_combinations.combination_id) AND (key = 'mango'::text))
  • Heap Fetches: 0
Planning time : 0.936 ms
Execution time : 391.009 ms