Home Forums SQL Server 2008 SQL Server 2008 - General Optimize query for finding nearest airport based on latitude and longitude using STDistance RE: Optimize query for finding nearest airport based on latitude and longitude using STDistance

  • Jeff Moden (4/29/2012)


    Nope... not the way I meant it. For the first and second optimizations, you would limit the lat/lons to the following yellow square.

    D'oh, okay, now I getcha. 🙂 Sometimes you just need to have it drawn out in pictures! :w00t:


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA