explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 18L4

Settings
# exclusive inclusive rows x rows loops node
1. 1.404 10.601 ↓ 610.0 610 1

Execution Time: 10.670 msHash Join (cost=1,009.14..4,783.35 rows=1 width=36) (actual time=8.008..10.601 rows=610 loops=1)

  • Hash Cond: (spaces.venue_id = venues.id)
2. 1.374 3.298 ↓ 1.3 2,055 1

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

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

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

4. 0.506 0.506 ↓ 1.0 3,701 1

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

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

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

  • Index Cond: (((max_state)::text = 'published'::text) AND (deleted_at IS NULL))
6. 0.348 5.899 ↓ 2,210.0 2,210 1

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

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 179kB
7. 5.551 5.551 ↓ 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.143..5.551 rows=2,210 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.278 ms