"People near me" query

Поиск
Список
Период
Сортировка
От David Garamond
Тема "People near me" query
Дата
Msg-id 405AC5D7.1090906@zara.6.isreserved.com
обсуждение исходный текст
Ответы Re: "People near me" query  (Nick Barr <nicky@chuckie.co.uk>)
Re: "People near me" query  (Yannick Warnier <ywarnier@beeznest.org>)
Re: "People near me" query  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
Imagine an Orkut-like site. Suppose we have 'person' table of 100k
people. About 75% of these people fill in their location
(City/State/Country) information. We also have a 'city' table containing
list of cities with their state & country and each city's
latitude/longitude. Assume all people's location is registered in the
'city' table.

How does one design a database to be able to process "Show me people
that live no farther than 250 miles from where I live" quickly? I can do
"Show me people that live within (A-X to A+X) latitude and (B-X to B+X)
longitude" though. (Where A and B is the latitude and longitude [of the
person], and X is some numeric value.

--
dave

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Huge number of raws
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Dynamically built and EXECUTEd query executing slowly