explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WbvqP : Optimization for: plan #RXcX

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.326 5.481 ↓ 179.0 179 1

Nested Loop Semi Join (cost=23.83..44.17 rows=1 width=1,409) (actual time=3.991..5.481 rows=179 loops=1)

2. 1.052 4.976 ↓ 179.0 179 1

Bitmap Heap Scan on restaurants r (cost=23.54..27.81 rows=1 width=1,409) (actual time=3.971..4.976 rows=179 loops=1)

  • Recheck Cond: ((delivery_area ~ '0101000000D3872EA86F99BBBF88BEBB9525C24940'::geometry) AND (((data ->> 'CityID'::text))::bigint = 1))
  • Filter: (((data ->> 'Status'::text) <> 'DISABLED'::text) AND _st_contains(delivery_area, '0101000000D3872EA86F99BBBF88BEBB9525C24940'::geometry))
  • Rows Removed by Filter: 59
  • Heap Blocks: exact=237
3. 0.101 3.924 ↓ 0.0 0 1

BitmapAnd (cost=23.54..23.54 rows=1 width=0) (actual time=3.924..3.924 rows=0 loops=1)

4. 0.272 0.272 ↓ 1.6 238 1

Bitmap Index Scan on restaurants_delivery_area_idx_rebuilt (cost=0.00..5.38 rows=146 width=0) (actual time=0.272..0.272 rows=238 loops=1)

  • Index Cond: (delivery_area ~ '0101000000D3872EA86F99BBBF88BEBB9525C24940'::geometry)
5. 3.551 3.551 ↓ 25.6 18,765 1

Bitmap Index Scan on restaurants_city_id_idx (cost=0.00..17.91 rows=732 width=0) (actual time=3.551..3.551 rows=18,765 loops=1)

  • Index Cond: (((data ->> 'CityID'::text))::bigint = 1)
6. 0.179 0.179 ↑ 1.0 1 179

Index Only Scan using neighborhoods_id_and_city_id_idx on neighborhoods h (cost=0.29..8.31 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=179)

  • Index Cond: ((id = ((r.data ->> 'NeighborhoodID'::text))::bigint) AND (city_id = 1))
  • Heap Fetches: 54
Planning time : 0.281 ms
Execution time : 5.551 ms