explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RMOU

Settings
# exclusive inclusive rows x rows loops node
1. 30,562.305 152,660.614 ↓ 7.0 14,490,065 1

Subquery Scan on nd (cost=2,507,795.01..8,485,134.39 rows=2,064,355 width=58) (actual time=12,806.757..152,660.614 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. 103,643.809 122,098.309 ↓ 1.3 14,650,077 1

WindowAgg (cost=2,507,795.01..5,879,918.60 rows=11,147,516 width=130) (actual time=12,806.164..122,098.309 rows=14,650,077 loops=1)

3. 13,926.876 18,454.500 ↓ 1.3 14,650,077 1

Sort (cost=2,507,795.01..2,535,663.80 rows=11,147,516 width=50) (actual time=12,806.124..18,454.500 rows=14,650,077 loops=1)

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

Seq Scan on point_v (cost=0.00..821,945.56 rows=11,147,516 width=50) (actual time=0.023..4,527.624 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))
  • Rows Removed by Filter: 11918935
Planning time : 0.740 ms