Re: Indexing on a circle datatype - Mailing list pgsql-performance

From Tom Lane
Subject Re: Indexing on a circle datatype
Date
Msg-id 14779.1251133586@sss.pgh.pa.us
Whole thread Raw
In response to Indexing on a circle datatype  (Gavin Love <gavin@splicer.org.uk>)
Responses Re: Indexing on a circle datatype  (Gavin Love <gavin@splicer.org.uk>)
List pgsql-performance
Gavin Love <gavin@splicer.org.uk> 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 by date:

Previous
From: Matthew Wakeling
Date:
Subject: Re: Indexing on a circle datatype
Next
From: Gavin Love
Date:
Subject: Re: Indexing on a circle datatype