explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EuAV : Optimization for: Optimization for: plan #bdG2; plan #TOy8

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 15,902.953 37,071.966 ↑ 8.3 8,487 1

Gather (cost=1,025.14..39,363.94 rows=70,732 width=8) (actual time=3,575.279..37,071.966 rows=8,487 loops=1)

  • Workers Planned: 2
  • Params Evaluated: $1
  • Workers Launched: 2
2.          

Initplan (forGather)

3. 0.004 0.096 ↑ 1.0 1 1

Result (cost=0.48..0.49 rows=1 width=4) (actual time=0.096..0.096 rows=1 loops=1)

4.          

Initplan (forResult)

5. 0.001 0.092 ↑ 1.0 1 1

Limit (cost=0.43..0.48 rows=1 width=4) (actual time=0.092..0.092 rows=1 loops=1)

6. 0.091 0.091 ↑ 5,631,036.0 1 1

Index Only Scan Backward using pk_samples on samples (cost=0.43..252,657.81 rows=5,631,036 width=4) (actual time=0.091..0.091 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Heap Fetches: 1
7. 19,051.881 21,168.917 ↑ 10.4 2,829 3

Nested Loop (cost=24.65..31,290.25 rows=29,472 width=8) (actual time=3,157.788..21,168.917 rows=2,829 loops=3)

8. 77.038 77.038 ↓ 1.1 10 3

Parallel Seq Scan on locations l (cost=0.00..10,958.27 rows=9 width=3,240) (actual time=3.149..77.038 rows=10 loops=3)

  • Filter: (location_type_id = 1103)
  • Rows Removed by Filter: 66934
9. 1,881.593 2,039.998 ↓ 4.3 274 31

Bitmap Heap Scan on samples s (cost=24.65..2,258.48 rows=63 width=104) (actual time=1,687.755..2,039.998 rows=274 loops=31)

  • Recheck Cond: (l.boundary_geom && geom)
  • Filter: ((id > $1) AND _st_intersects(l.boundary_geom, geom))
  • Rows Removed by Filter: 249796
  • Heap Blocks: exact=1197262
10. 158.405 158.405 ↓ 475.1 267,504 31

Bitmap Index Scan on ix_samples_geom (cost=0.00..24.64 rows=563 width=0) (actual time=158.405..158.405 rows=267,504 loops=31)

  • Index Cond: (l.boundary_geom && geom)
Planning time : 1.777 ms