David Cottingham <[EMAIL PROTECTED]> writes:
> I have a table containing a field named location, of type point, i.e. a 
> position in two dimensions. The table has several million records in, and I 
> need to extract those records whose location value is contained within a 
> certain bounding box.

Given the standard opclasses, your best bet is to convert the point into
a zero-volume box or circle, eg

        create index i on t using gist (circle(pointcol,0))

and then express queries as "circle(pointcol,0) overlaps target-box".

PostGIS might have something more nicely adapted ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to