Index on points - Mailing list pgsql-general

From A B
Subject Index on points
Date
Msg-id AANLkTimXsxQnV+sa1+u9U1Hic1Kk2fdyEqZxhp3ehuPy@mail.gmail.com
Whole thread Raw
Responses Re: Index on points  (Jeff Davis <pgsql@j-davis.com>)
Re: Index on points  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Hello.

If I have a table like this

create table fleet ( ship_id   integer,  location point);

and fill it with a lot of ships and their locations and then want to
create an index on this to speed up operations on finding ships within
a certain region (let's say its a rectangular region), how do I do
this?

I tried:

CREATE INDEX my_index  ON fleet USING gist ( box(location,location)); ?

and that command worked, but I have no idea why and what I have just
done. The docs are a little to advanced.

How should one do it?

pgsql-general by date:

Previous
From:
Date:
Subject: Re: Kill -9 for a session process caused all the sessions to be killed
Next
From: Vick Khera
Date:
Subject: Re: What was new in 8.4 & 8.3?