explain.depesz.com

PostgreSQL's explain analyze made readable

Result: swbH

Settings
# exclusive inclusive rows x rows loops node
1. 0.153 7,265.533 ↓ 610.0 610 1

Index Cond: (lonlat && '0101000020E6100000000000000088BDBFFED1A4F5F0C04940'::geography)Limit (cost=1,000.73..4,799.48 rows=1 width=36) (actual time=31.085..7,265.533 rows=610 loops=1)

2. 1,651.686 7,265.380 ↓ 610.0 610 1

Nested Loop (cost=1,000.73..4,799.48 rows=1 width=36) (actual time=31.083..7,265.380 rows=610 loops=1)

  • Join Filter: (spaces.venue_id = venues.id)
  • Rows Removed by Join Filter: 4,540,940
3. 13.554 13.554 ↓ 2,210.0 2,210 1

Index Scan using v_gix on venues (cost=0.15..8.54 rows=1 width=36) (actual time=0.129..13.554 rows=2,210 loops=1)

  • Filter: (('0101000020E6100000000000000088BDBFFED1A4F5F0C04940'::geography && _st_expand(lonlat, '3000'::double precision)) AND _st_dwithin(lonlat, '0101000020E6100000000000000088BDBFFED1A4F5F0C04940'::geography, '3000'::double precision, true))
  • Rows Removed by Filter: 484
4. 2,026.570 5,600.140 ↓ 1.3 2,055 2,210

Bitmap Heap Scan on spaces (cost=1,000.59..4,770.50 rows=1,635 width=12) (actual time=1.792..2.534 rows=2,055 loops=2,210)

  • Recheck Cond: ((collections && '{22}'::integer[]) AND ((max_state)::text = 'published'::text) AND (deleted_at IS NULL))
  • Heap Blocks: exact=3,642,080
5. 256.360 3,573.570 ↓ 0.0 0 2,210

BitmapAnd (cost=1,000.59..1,000.59 rows=1,635 width=0) (actual time=1.617..1.617 rows=0 loops=2,210)

6. 1,076.270 1,076.270 ↓ 1.0 3,701 2,210

Bitmap Index Scan on idx_spaces_collections (cost=0.00..43.70 rows=3,693 width=0) (actual time=0.487..0.487 rows=3,701 loops=2,210)

  • Index Cond: (collections && '{22}'::integer[])
7. 2,240.940 2,240.940 ↓ 1.1 9,570 2,210

Bitmap Index Scan on idx_spaces_on_max_state_deleted (cost=0.00..955.82 rows=8,741 width=0) (actual time=1.014..1.014 rows=9,570 loops=2,210)

  • Index Cond: (((max_state)::text = 'published'::text) AND (deleted_at IS NULL))
Planning time : 0.278 ms
Execution time : 7,265.672 ms