explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uF4R

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=5,280.64..5,280.74 rows=1 width=16) (actual rows= loops=)

2.          

Initplan (forAggregate)

3. 0.000 0.000 ↓ 0.0

Aggregate (cost=4,722.56..4,722.66 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Index Scan using search_platform_merchants_suptak_supdel_index on merchants m (cost=0.55..4,722.51 rows=22 width=0) (actual rows= loops=)

  • Index Cond: (supports_takeout = true)
  • Filter: (supports_takeout AND (channels && '{IFOOD}'::text[]) AND ((location)::geography && '0101000020E6100000DB4FC6F8305747C056B60F79CB9537C0'::geography) AND ('0101000020E6100000DB4FC6F8305747C056B60F79CB9537C0'::geography && _st_expand((location)::geography, '30000'::double precision)) AND _st_dwithin((location)::geography, '0101000020E6100000DB4FC6F8305747C056B60F79CB9537C0'::geography, '30000'::double precision, true))
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=164.10..557.78 rows=81 width=0) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Unique (cost=163.68..164.11 rows=85 width=28) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=163.68..163.89 rows=85 width=28) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".owner_id, (("*SELECT* 1".mode <> 'EXCLUSION'::delivery_mode)), "*SELECT* 1".zipcode COLLATE "C", "*SELECT* 1".priority
8. 0.000 0.000 ↓ 0.0

Result (cost=0.85..160.96 rows=85 width=28) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Append (cost=0.85..152.25 rows=85 width=31) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=0.85..94.99 rows=60 width=31) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..88.99 rows=60 width=159) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using polygons_geom_idx on polygons pol (cost=0.42..4.78 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (geom && '0101000020E6100000DB4FC6F8305747C056B60F79CB9537C0'::geometry)
  • Filter: _st_intersects(geom, '0101000020E6100000DB4FC6F8305747C056B60F79CB9537C0'::geometry)
13. 0.000 0.000 ↓ 0.0

Index Scan using deliveries_pol_id_idx on deliveries dels (cost=0.43..78.22 rows=60 width=47) (actual rows= loops=)

  • Index Cond: (pol_id = pol.pol_id)
14. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=0.43..57.25 rows=25 width=31) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using deliveries_zipcode_idx on deliveries dels_1 (cost=0.43..54.75 rows=25 width=159) (actual rows= loops=)

  • Index Cond: (zipcode = '04538110'::text)
16. 0.000 0.000 ↓ 0.0

Index Scan using merchants_pkey on merchants merc (cost=0.42..4.53 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (merchant_id = "*SELECT* 1".owner_id)
  • Filter: (supports_delivery AND (channels && '{IFOOD}'::text[]))