explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tQj9 : fatmap_routes

Settings
# exclusive inclusive rows x rows loops node
1. 819.520 822.362 ↓ 8.0 8 1

Nested Loop (cost=8.78..16.89 rows=1 width=119) (actual time=21.015..822.362 rows=8 loops=1)

2. 0.038 2.794 ↓ 8.0 8 1

Nested Loop (cost=8.63..16.69 rows=1 width=319) (actual time=1.472..2.794 rows=8 loops=1)

3. 2.591 2.591 ↓ 33.0 33 1

CTE Scan on zoom_line z (cost=8.34..8.36 rows=1 width=40) (actual time=1.456..2.591 rows=33 loops=1)

  • Filter: (rank = 1)
  • Rows Removed by Filter: 461
4.          

CTE zoom_line

5. 0.598 2.247 ↓ 494.0 494 1

WindowAgg (cost=8.32..8.34 rows=1 width=49,995) (actual time=1.450..2.247 rows=494 loops=1)

6. 0.724 1.649 ↓ 494.0 494 1

Sort (cost=8.32..8.32 rows=1 width=49,987) (actual time=1.443..1.649 rows=494 loops=1)

  • Sort Key: zoom_level_lines.id, zoom_level_lines.zoom_level DESC
  • Sort Method: quicksort Memory: 429kB
7. 0.925 0.925 ↓ 494.0 494 1

Index Scan using zoom_level_lines_geometry_idx on zoom_level_lines (cost=0.28..8.31 rows=1 width=49,987) (actual time=0.054..0.925 rows=494 loops=1)

  • Index Cond: (geometry && '0103000020110F0000010000000500000042CCCA0C78B566C14877C65D3710524142CCCA0C78B566C1C9BCBE794A1052417CA9CE7E6EB566C1C9BCBE794A1052417CA9CE7E6EB566C14877C65D3710524142CCCA0C78B566C14877C65D37105241'::geometry)
  • Filter: ((zoom_level <= 19) AND (line_type = 'Adventure'::zoom_level_line_type))
8. 0.165 0.165 ↓ 0.0 0 33

Index Scan using adventures_pkey on adventures lyr (cost=0.29..8.30 rows=1 width=287) (actual time=0.004..0.005 rows=0 loops=33)

  • Index Cond: (id = z.id)
  • Filter: visible
  • Rows Removed by Filter: 0
9. 0.048 0.048 ↑ 1.0 1 8

Index Scan using adventure_types_pkey on adventure_types activity (cost=0.15..0.17 rows=1 width=36) (actual time=0.003..0.006 rows=1 loops=8)

  • Index Cond: (id = lyr.adventure_type_id)
  • Filter: (name = ANY ('{HIKE,BIKE,BIKEPARK}'::text[]))