explain.depesz.com

PostgreSQL's explain analyze made readable

Result: V0V4 : Optimization for: Optimization for: plan #347v; plan #eq6U

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 102.938 218.036 ↓ 75.1 8,261 1

Aggregate (cost=2,871.61..3,150.51 rows=110 width=204) (actual time=112.485..218.036 rows=8,261 loops=1)

  • Buffers: shared hit=338, temp read=359 written=360
2. 37.543 115.098 ↓ 75.5 19,095 1

Sort (cost=2,871.61..2,872.24 rows=253 width=156) (actual time=111.658..115.098 rows=19,095 loops=1)

  • Sort Key: cities.id
  • Sort Method: external merge Disk: 2872kB
  • Buffers: shared hit=338, temp read=359 written=360
3. 10.058 77.555 ↓ 75.5 19,095 1

Hash Join (cost=2,477.71..2,861.51 rows=253 width=156) (actual time=51.519..77.555 rows=19,095 loops=1)

  • Buffers: shared hit=338
4. 14.422 66.931 ↓ 75.5 19,095 1

Hash Join (cost=2,474.03..2,857.12 rows=253 width=153) (actual time=49.454..66.931 rows=19,095 loops=1)

  • Buffers: shared hit=336
5. 4.489 4.489 ↑ 1.0 19,095 1

Seq Scan on city_provider_source city_provider_source (cost=0..332.95 rows=19,095 width=17) (actual time=0.26..4.489 rows=19,095 loops=1)

  • Buffers: shared hit=142
6. 34.165 48.020 ↓ 75.3 8,286 1

Hash (cost=2,472.65..2,472.65 rows=110 width=140) (actual time=48.02..48.02 rows=8,286 loops=1)

  • Buffers: shared hit=194
7. 13.855 13.855 ↓ 75.3 8,286 1

Seq Scan on cities cities (cost=0..2,472.65 rows=110 width=140) (actual time=0.263..13.855 rows=8,286 loops=1)

  • Filter: ((st_setsrid(cities.bbox, 4326) && '0103000020E61000000100000005000000000000089F68F8C0A3F7695B0F67F8C0000000089F68F8C05D0896A4F06CF840000000F8606BF8405D0896A4F06CF840000000F8606BF840A3F7695B0F67F8C0000000089F68F8C0A3F7695B0F67F8C0'::geometry) AND ('0101000020E610000000000000800F3640F4E942B024854740'::geometry && st_expand(st_setsrid(cities.bbox, 4326), '100000'::double precision)) AND _st_dwithin(st_setsrid(cities.bbox, 4326), '0101000020E610000000000000800F3640F4E942B024854740'::geometry, '100000'::double precision))
  • Buffers: shared hit=194
8. 0.532 0.566 ↑ 1.0 75 1

Hash (cost=2.75..2.75 rows=75 width=11) (actual time=0.566..0.566 rows=75 loops=1)

  • Buffers: shared hit=2
9. 0.034 0.034 ↑ 1.0 75 1

Seq Scan on providers providers (cost=0..2.75 rows=75 width=11) (actual time=0.018..0.034 rows=75 loops=1)

  • Buffers: shared hit=2