explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BG1T

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 288.157 ↑ 1.0 10 1

Limit (cost=72,406.72..72,406.74 rows=10 width=274) (actual time=288.150..288.157 rows=10 loops=1)

2. 1.436 288.153 ↑ 9.5 10 1

Sort (cost=72,406.72..72,406.96 rows=95 width=274) (actual time=288.149..288.153 rows=10 loops=1)

  • Sort Key: (_st_distance((st_makepoint(bike.lon, bike.lat))::geography(Geometry,4326), '0101000020E61000002030C50BD86F5340345D990178FD2940'::geography(Geometry,4326), '0'::double precision, true))
  • Sort Method: top-N heapsort Memory: 28kB
3. 4.858 286.717 ↓ 11.7 1,111 1

Nested Loop (cost=18,720.40..72,404.67 rows=95 width=274) (actual time=142.006..286.717 rows=1,111 loops=1)

4. 163.452 278.526 ↓ 11.6 1,111 1

Bitmap Heap Scan on bike (cost=18,720.12..71,629.72 rows=96 width=139) (actual time=141.898..278.526 rows=1,111 loops=1)

  • Recheck Cond: (axcess_id IS NOT NULL)
  • Filter: ((type <> 'cycle'::keyless_type) AND (status = 'idle'::bike_status) AND ((st_makepoint(lon, lat))::geography(Geometry,4326) && '0101000020E61000002030C50BD86F5340345D990178FD2940'::geography) AND ('0101000020E61000002030C50BD86F5340345D990178FD2940'::geography(Geometry,4326) && _st_expand((st_makepoint(lon, lat))::geography(Geometry,4326), '1500'::double precision)) AND _st_dwithin((st_makepoint(lon, lat))::geography(Geometry,4326), '0101000020E61000002030C50BD86F5340345D990178FD2940'::geography(Geometry,4326), '1500'::double precision, true))
  • Rows Removed by Filter: 16069
  • Heap Blocks: exact=109814
5. 115.074 115.074 ↓ 46.1 784,594 1

Bitmap Index Scan on idx_bike_axcess_id (cost=0.00..18,720.09 rows=17,024 width=0) (actual time=115.074..115.074 rows=784,594 loops=1)

  • Index Cond: (axcess_id IS NOT NULL)
6. 3.333 3.333 ↑ 1.0 1 1,111

Index Scan using axcess_pkey on axcess (cost=0.29..7.81 rows=1 width=135) (actual time=0.003..0.003 rows=1 loops=1,111)

  • Index Cond: (id = bike.axcess_id)
  • Filter: (ota_status = 'COMPLETED'::otastatus)
Planning time : 0.420 ms