explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Loop

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.063 4,246.900 ↑ 1.0 1 1

Aggregate (cost=122.68..122.69 rows=1 width=8) (actual time=4,246.900..4,246.900 rows=1 loops=1)

2. 0.000 4,246.837 ↓ 38.0 38 1

Nested Loop (cost=1.42..122.68 rows=1 width=4) (actual time=6.061..4,246.837 rows=38 loops=1)

3. 16.229 4,120.161 ↓ 67,091.0 67,091 1

Nested Loop (cost=1.14..122.11 rows=1 width=8) (actual time=0.167..4,120.161 rows=67,091 loops=1)

4. 4.021 38.370 ↓ 3,463.0 3,463 1

Nested Loop (cost=0.86..121.56 rows=1 width=36) (actual time=0.052..38.370 rows=3,463 loops=1)

5. 17.034 17.034 ↓ 3,463.0 3,463 1

Index Scan using idx_abstract_reservation_selectedstartdate on md_abstract_reservation m0_ (cost=0.43..113.10 rows=1 width=8) (actual time=0.030..17.034 rows=3,463 loops=1)

  • Index Cond: ((selectedstartdate >= now()) AND (selectedstartdate <= (now() + '10 days'::interval)))
  • Filter: (((status)::text = ANY ('{ACCEPTED,REQUESTED}'::text[])) AND ((type)::text = 'DISTANCE'::text))
  • Rows Removed by Filter: 1478
6. 17.315 17.315 ↑ 1.0 1 3,463

Index Scan using idx_location_cityarea on md_location m1_ (cost=0.43..8.45 rows=1 width=36) (actual time=0.005..0.005 rows=1 loops=3,463)

  • Index Cond: (id = m0_.origin_id)
7. 4,065.562 4,065.562 ↓ 19.0 19 3,463

Index Scan using idx_polygon on md_polygon m2_ (cost=0.28..0.54 rows=1 width=166) (actual time=0.326..1.174 rows=19 loops=3,463)

  • Index Cond: (polygon && m1_.point)
  • Filter: _st_covers(polygon, m1_.point)
  • Rows Removed by Filter: 1
8. 134.182 134.182 ↓ 0.0 0 67,091

Index Scan using uniq_a8fb057924c7c0fb on md_area m3_ (cost=0.28..0.56 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=67,091)

  • Index Cond: (polygon_id = m2_.id)
  • Filter: (id = 2)
  • Rows Removed by Filter: 1