Re: Indexing on a circle datatype

От: Tom Lane
Тема: Re: Indexing on a circle datatype
Дата: ,
Msg-id: 14779.1251133586@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Indexing on a circle datatype  (Gavin Love)
Ответы: Re: Indexing on a circle datatype  (Gavin Love)
Список: pgsql-performance

Скрыть дерево обсуждения

Indexing on a circle datatype  (Gavin Love, )
 Re: Indexing on a circle datatype  (Matthew Wakeling, )
 Re: Indexing on a circle datatype  (Tom Lane, )
  Re: Indexing on a circle datatype  (Gavin Love, )

Gavin Love <> writes:
> I seem to be unable to get postgres to use a gist index we have on a
> circle data type.
> SELECT  id FROM  tradesmen_profiles WHERE tradesmen_profiles.work_area
> @> point(0.0548691728419,51.5404384172);

So far as I can see, the member operators of gist circle_ops are

 gist         | circle_ops         | <<(circle,circle)
 gist         | circle_ops         | &<(circle,circle)
 gist         | circle_ops         | &>(circle,circle)
 gist         | circle_ops         | >>(circle,circle)
 gist         | circle_ops         | <@(circle,circle)
 gist         | circle_ops         | @>(circle,circle)
 gist         | circle_ops         | ~=(circle,circle)
 gist         | circle_ops         | &&(circle,circle)
 gist         | circle_ops         | |>>(circle,circle)
 gist         | circle_ops         | <<|(circle,circle)
 gist         | circle_ops         | &<|(circle,circle)
 gist         | circle_ops         | |&>(circle,circle)
 gist         | circle_ops         | @(circle,circle)
 gist         | circle_ops         | ~(circle,circle)

(this is extracted from the output of the query shown in 8.4 docs
section 11.9).  So, circle @> point is out of luck.  Try using a
zero- or small-radius circle on the right.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Gavin Love
Дата:
Сообщение: Re: Indexing on a circle datatype
От: Fred Janon
Дата:
Сообщение: Fwd: How to create a multi-column index with 2 dates using 'gist'?