explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eCZn

Settings
# exclusive inclusive rows x rows loops node
1. 0.706 4.893 ↓ 595.0 595 1

Nested Loop (cost=31.17..43.49 rows=1 width=1,207) (actual time=1.956..4.893 rows=595 loops=1)

2. 1.090 2.989 ↓ 599.0 599 1

Bitmap Heap Scan on restaurant_delivery_areas rda (cost=30.88..35.15 rows=1 width=8) (actual time=1.928..2.989 rows=599 loops=1)

  • Recheck Cond: ((delivery_area ~ '0101000020E610000005A8A9656B7DC1BF98DD938785C24940'::geometry) AND (zone_id = 2))
  • Filter: _st_contains(delivery_area, '0101000020E610000005A8A9656B7DC1BF98DD938785C24940'::geometry)
  • Rows Removed by Filter: 15
  • Heap Blocks: exact=70
3. 0.053 1.899 ↓ 0.0 0 1

BitmapAnd (cost=30.88..30.88 rows=1 width=0) (actual time=1.899..1.899 rows=0 loops=1)

4. 1.739 1.739 ↓ 206.5 5,783 1

Bitmap Index Scan on ix_rda (cost=0.00..4.49 rows=28 width=0) (actual time=1.739..1.739 rows=5,783 loops=1)

  • Index Cond: (delivery_area ~ '0101000020E610000005A8A9656B7DC1BF98DD938785C24940'::geometry)
5. 0.107 0.107 ↑ 1.0 1,314 1

Bitmap Index Scan on ix_rda2 (cost=0.00..26.14 rows=1,314 width=0) (actual time=0.107..0.107 rows=1,314 loops=1)

  • Index Cond: (zone_id = 2)
6. 1.198 1.198 ↑ 1.0 1 599

Index Scan using restaurants_id_idx on restaurants r (cost=0.29..8.31 rows=1 width=1,207) (actual time=0.002..0.002 rows=1 loops=599)

  • Index Cond: (id = rda.restaurant_id)
  • Filter: ((delivery_area IS NULL) AND ((data ->> 'Status'::text) <> 'DISABLED'::text))
  • Rows Removed by Filter: 0