Re: Indexing on a circle datatype

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Love <gavin(at)splicer(dot)org(dot)uk>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Indexing on a circle datatype
Date: 2009-08-24 17:06:26
Message-ID: 14779.1251133586@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Gavin Love <gavin(at)splicer(dot)org(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gavin Love 2009-08-24 17:46:59 Re: Indexing on a circle datatype
Previous Message Matthew Wakeling 2009-08-24 17:03:48 Re: Indexing on a circle datatype