Re: R-tree, order by, limit

Поиск
Список
Период
Сортировка
Искать
От
Volkan YAZICI
Тема
Re: R-tree, order by, limit
Дата
Msg-id
87hc89lhzn.fsf@alamut.mobiliz.com.tr
Ответ на
R-tree, order by, limit (Anton Belyaev)
Список
Дерево обсуждения
R-tree, order by, limit "Anton Belyaev" <anton.belyaev@gmail.com>
Re: R-tree, order by, limit Volkan YAZICI <yazicivo@ttmail.com>
Re: R-tree, order by, limit "Anton Belyaev" <anton.belyaev@gmail.com>
Re: R-tree, order by, limit Martijn van Oosterhout <kleptog@svana.org>
Re: R-tree, order by, limit "Anton Belyaev" <anton.belyaev@gmail.com>
Re: R-tree, order by, limit Volkan YAZICI <yazicivo@ttmail.com>
Re: R-tree, order by, limit "Anton Belyaev" <anton.belyaev@gmail.com>
Re: R-tree, order by, limit Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Re: R-tree, order by, limit "Anton Belyaev" <anton.belyaev@gmail.com>
Re: R-tree, order by, limit Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
On Sun, 21 Sep 2008, "Anton Belyaev"  writes:
> SELECT * FROM towns where alt1 <= alt <= alt2 AND long1 <= long <=
> long2 ORDER BY population LIMIT 10;

You're absolutely on the wrong path. Don't try to implement a logic,
that has been implemented by PostgreSQL in the most possibly efficient
way in its bounds. See geographic data types[1] (e.g. box) and
geographic functions[2] (e.g. @> a.k.a contains).


Regards.

[1] http://www.postgresql.org/docs/current/interactive/datatype-geometric.html
[2] http://www.postgresql.org/docs/current/interactive/functions-geometry.html
В списке pgsql-general по дате отправления
От: Anton Belyaev
Дата:
Сообщение: R-tree, order by, limit
От: Anton Belyaev
Дата:
Сообщение: Re: R-tree, order by, limit
FAQ