concept ORDER BY in category postgis

This is an excerpt from Manning's book PostGIS in Action, Third Edition.
In the above listing a comma-separated list of distinct fields in parentheses must follow
DISTINCT ON. This same list must appear first in theORDER BYclause. Then you specify the maximum radius to scan for matches. The wider your radius, the slower the query, but you’re more likely to be guaranteed matches. This listing uses a left join instead of an inner join to ensure that even if you find no navaids, the airport will still be in the results. You sort the navaids bydist_kmto ensure that the navaid selected for output for each airport is the closest to that airport.

This is an excerpt from Manning's book PostGIS in Action, Second Edition.
In listing 10.3 a comma-separated list of distinct fields in parentheses must follow DISTINCT ON ❶. This same list must appear first in the ORDER BY clause ❸. Then you specify the maximum radius to scan for matches ❷. The wider your radius, the slower the query, but you’re more likely to be guaranteed matches. This listing uses a left join instead of an inner join to ensure that even if you find no navaids, the airport will still be in the results ❷. You sort the navaids by dist_km to ensure that the navaid selected for output for each airport is the closest to that airport ❸.
The two KNN operators behave very differently from the commonly used bounding-box intersects spatial operator (&&). Unlike &&, which utilizes spatial indexes when used in WHERE and JOIN clauses, the KNN operators can only use a spatial index when in the ORDER BY clause and when one side of the operator remains constant through the life of the query. In addition, KNN operators return a numeric value rather than a true/false value like many other operators.