Make a calculated column and sort by it. A formula you can Google for short distances. For large - not just
Jarrett_Remp answered on March 23rd 20 at 18:49
If you don't want to do quite complicated mathematical calculations, you'll find it easier to have a separate table with distances: from, to, and distance and have it do the conversion. Well, respectively, every time to update.
On updates of course will lose, but the select is very fast.
Herman.Jacobson answered on March 23rd 20 at 18:51
You can count, it will have to go through all the table rows and for each point calculate the distance to your point and then sort. But if you want to select only a few nearby points, or just points not too remote from the target, you can use the technique of bounding-box: imagine that the point of a cube or square of a given size and to spend the first calculation within the boundaries of the cube. This will allow somehow to use indices.