explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2OWj

Settings
# exclusive inclusive rows x rows loops node
1. 30,977.949 348,126.321 ↓ 7.0 14,490,065 1

Subquery Scan on nd (cost=4,626,156.14..10,587,613.19 rows=2,058,870 width=58) (actual time=200,611.742..348,126.321 rows=14,490,065 loops=1)

  • Filter: (((('2'::double precision * sqrt((power((nd.lat2 - nd.lat1), '2'::double precision) + power((nd.lng2 - nd.lng1), '2'::double precision)))) * sqrt((power((nd.lat2 - nd.lat3), '2'::double precision) + power((nd.lng2 - nd.lng3), '2'::double precision)))) > '1e-11'::double precision) AND (('1.00001'::double precision < abs(((((((power((nd.lat2 - nd.lat1), '2'::double precision) + power((nd.lng2 - nd.lng1), '2'::double precision)) + power((nd.lat2 - nd.lat3), '2'::double precision)) + power((nd.lng2 - nd.lng3), '2'::double precision)) - power((nd.lat1 - nd.lat3), '2'::double precision)) - power((nd.lng1 - nd.lng3), '2'::double precision)) / (('2'::double precision * sqrt((power((nd.lat2 - nd.lat1), '2'::double precision) + power((nd.lng2 - nd.lng1), '2'::double precision)))) * sqrt((power((nd.lat2 - nd.lat3), '2'::double precision) + power((nd.lng2 - nd.lng3), '2'::double precision))))))) OR (abs(((((((power((nd.lat2 - nd.lat1), '2'::double precision) + power((nd.lng2 - nd.lng1), '2'::double precision)) + power((nd.lat2 - nd.lat3), '2'::double precision)) + power((nd.lng2 - nd.lng3), '2'::double precision)) - power((nd.lat1 - nd.lat3), '2'::double precision)) - power((nd.lng1 - nd.lng3), '2'::double precision)) / (('2'::double precision * sqrt((power((nd.lat2 - nd.lat1), '2'::double precision) + power((nd.lng2 - nd.lng1), '2'::double precision)))) * sqrt((power((nd.lat2 - nd.lat3), '2'::double precision) + power((nd.lng2 - nd.lng3), '2'::double precision)))))) < '1'::double precision)))
  • Rows Removed by Filter: 160012
2. 104,502.568 317,148.372 ↓ 1.3 14,650,077 1

WindowAgg (cost=4,626,156.14..7,989,319.68 rows=11,117,896 width=130) (actual time=200,611.156..317,148.372 rows=14,650,077 loops=1)

3. 21,932.865 212,645.804 ↓ 1.3 14,650,077 1

Sort (cost=4,626,156.14..4,653,950.88 rows=11,117,896 width=50) (actual time=200,611.126..212,645.804 rows=14,650,077 loops=1)

  • Sort Key: point_2019_08_01.tracker_code, point_2019_08_01.navigation_time
  • Sort Method: external merge Disk: 817192kB
4. 190,712.939 190,712.939 ↓ 1.3 14,650,077 1

Seq Scan on point_2019_08_01 (cost=0.00..2,944,998.62 rows=11,117,896 width=50) (actual time=0.016..190,712.939 rows=14,650,077 loops=1)

  • Filter: (((nsat > 3) OR (nsat IS NULL)) AND ((pdop < 8) OR (pdop IS NULL)) AND (speed > 5) AND (speed < 150) AND (NOT (geom ~= '0101000020E610000000000000000000000000000000000000'::geometry)))
  • Rows Removed by Filter: 12321773
Planning time : 20.352 ms