Re: Question on "box @> point" using GiST index on boxes
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Question on "box @> point" using GiST index on boxes |
| Дата | |
| Msg-id | 13902.1349320071@sss.pgh.pa.us обсуждение |
| Ответ на | Question on "box @> point" using GiST index on boxes (Ralf Rantzau <rrantzau@gmail.com>) |
| Список | pgsql-hackers |
Ralf Rantzau <rrantzau@gmail.com> writes:
> I would like to test the containment of a point against many boxes.
> I did not find a way to express "box @> point" in straightforward way such
> that the GiST index on the boxes is exploited.
Yeah, that operator is not in any GiST opclass, as you can easily verify
with a look into pg_amop. It seems like it probably wouldn't be
terribly hard to add it (and related box vs point operators) to GiST
box_ops, but nobody's bothered to do the legwork.
> The way I currently represent a point p is as: box(p, p). In this case,
> the GiST index use kicks in.
Right, that's the standard workaround. Note that I'm not sure that
direct use of the box vs point operators would be any faster, but it'd
surely be less surprising.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера