From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Hoffmann <jeff(at)propertykey(dot)com> |
Cc: | Peter Keller <peter(dot)keller(at)bvv(dot)bayern(dot)de>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: index on points |
Date: | 2000-10-10 16:36:24 |
Message-ID: | 19545.971195784@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jeff Hoffmann <jeff(at)propertykey(dot)com> writes:
> Tom Lane wrote:
>> There is already support for r-tree indexes, but as far as I know the
>> '@' operator is not connected up to indexes.
> i'm just throwing this out without testing it, but i think something
> like this might work: coerce both the point and polygon into boxes (i
> think box(polygon) gives you the bounding box, at least) and use the
> overlap (&&) operator, which works fine with r-tree indexes on two
> boxes, then use the contained operator (@) on what you get from that.
Right, that's pretty much exactly what index support for @ would do for
you under-the-hood. I wouldn't expect the index to give you an answer
finer-grained than bounding boxes, so you'd still need to run @ itself
on the candidates found by the indexable query.
Jeff has a good point that doing the transformation by hand might be
an acceptable answer for the time being. You can hack a lot of queries
in the time it will take to teach the system to do that same
transformation ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-10-10 16:46:37 | Re: [HACKERS] My new job |
Previous Message | Efrain Caro | 2000-10-10 16:27:53 | Re: Delphi PostgreSQL Forum |