+ Post New Thread
Results 1 to 2 of 2
Coding Thread, Determine Users within X Radius by Postcode in Coding and Web Development; I have two database tables: The first which is a table of postcodes (around 1.7 million records) and has a ...
  1. #1

    Join Date
    Apr 2010
    Posts
    8
    Thank Post
    4
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Determine Users within X Radius by Postcode

    I have two database tables:

    The first which is a table of postcodes (around 1.7 million records) and has a postcode, longitude and latitude field.
    The second which is a table of user data, which includes a postcode field - their postcode on registration.

    I need to be able to determine which users fall within X radius of Y (another users postcode) without ideally running a query to compare distances with all 1.7 million postcodes to shortlist possibles.

    I was thinking maybe it'd be possible to take Y users postcode and to use their longitude and latitude, doing some math (not my strong point) to determine all possible postcodes - by adjusting the longitude and latitude degrees relative to the distance being searched.

    Where to start?

  2. #2
    InterwebsGuy's Avatar
    Join Date
    Jan 2011
    Posts
    220
    Thank Post
    57
    Thanked 21 Times in 21 Posts
    Rep Power
    11
    This might be helpful:
    Avoiding a full table scan - comp.databases.mysql | Google Groups

    I came across it by chance awhile back and bookmarked it for future reference. Interesting stuff!

SHARE:
+ Post New Thread

Similar Threads

  1. No Logon name after addding users by DSADD
    By tosca925 in forum Windows
    Replies: 8
    Last Post: 23rd May 2011, 08:31 PM
  2. Replies: 3
    Last Post: 13th August 2009, 10:52 PM
  3. OS X Leopard RADIUS Server for AD users
    By HodgeHi in forum Mac
    Replies: 1
    Last Post: 8th November 2008, 10:04 AM
  4. Changing passwords for SIMS users by script
    By academic_mwnci in forum MIS Systems
    Replies: 2
    Last Post: 3rd September 2008, 12:02 AM
  5. Remote Control Users By Username
    By mmoseley in forum Network and Classroom Management
    Replies: 15
    Last Post: 11th July 2007, 08:50 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •