|_. id |_. select_type |_. table |_. type |_. possible_keys |_. key |_. key_len |_. ref |_. rows |_. Extra |
| 1 | PRIMARY | tc_pos | ref | position_deviceid_dateadd | position_deviceid_dateadd | 4 | const | 126758 | Using index condition |
| 3 | DEPENDENT SUBQUERY | next | ref | position_deviceid_dateadd | position_deviceid_dateadd | 4 | const | 126758 | Using index condition; Using where |
Select distance from position where ....
insert into positions (date_add,latitude,longitude)values
('2021-01-07 01:00:00','55.715954','37.458170'),
('2021-01-07 02:00:00','55.715930,'37.458160'),
('2021-01-07 03:00:00','55.715950','37.458150');
update positions set
current_point_n=st_geometryfromtext('POINT('|| latitude ||' '|| longitude ||')',4326);
Супер.
Самое оно.
Спасибо!