explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t35v

Settings
# exclusive inclusive rows x rows loops node
1. 1.425 10.505 ↓ 610.0 610 1

Hash Join (cost=1,009.14..4,783.35 rows=1 width=36) (actual time=7.860..10.505 rows=610 loops=1)

  • Hash Cond: (spaces.venue_id = venues.id)
2. 1.410 3.194 ↓ 1.3 2,054 1

Bitmap Heap Scan on spaces (cost=1,000.59..4,770.50 rows=1,635 width=12) (actual time=1.961..3.194 rows=2,054 loops=1)

  • Recheck Cond: ((collections && '{22}'::integer[]) AND ((max_state)::text = 'published'::text) AND (deleted_at IS NULL))
  • Heap Blocks: exact=1,647
3. 0.123 1.784 ↓ 0.0 0 1

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

4. 0.512 0.512 ↑ 1.0 3,693 1

Bitmap Index Scan on idx_spaces_collections (cost=0.00..43.70 rows=3,693 width=0) (actual time=0.512..0.512 rows=3,693 loops=1)

  • Index Cond: (collections && '{22}'::integer[])
5. 1.149 1.149 ↓ 1.1 9,578 1

Bitmap Index Scan on idx_spaces_on_max_state_deleted (cost=0.00..955.82 rows=8,741 width=0) (actual time=1.149..1.149 rows=9,578 loops=1)

  • Index Cond: (((max_state)::text = 'published'::text) AND (deleted_at IS NULL))
6. 0.328 5.886 ↓ 2,209.0 2,209 1

Hash (cost=8.54..8.54 rows=1 width=36) (actual time=5.886..5.886 rows=2,209 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 179kB
7. 5.558 5.558 ↓ 2,209.0 2,209 1

Index Scan using v_gix on venues (cost=0.15..8.54 rows=1 width=36) (actual time=0.145..5.558 rows=2,209 loops=1)

  • Index Cond: (lonlat && '0101000020E6100000000000000088BDBFFED1A4F5F0C04940'::geography)
  • Filter: (('0101000020E6100000000000000088BDBFFED1A4F5F0C04940'::geography && _st_expand(lonlat, '3000'::double precision)) AND _st_dwithin(lonlat, '0101000020E6100000000000000088BDBFFED1A4F5F0C04940'::geography, '3000'::double precision, true))
  • Rows Removed by Filter: 484
Planning time : 0.319 ms
Execution time : 10.592 ms